Page 1 of 1

Write multiple xls files without closing the program?

Posted: Fri Dec 12, 2014 5:35 pm
by CJohnson
Hi all. I've got a pretty simple question. If I write to an XLS component and call XLS.Write, it writes the file as I want it to. If I change data and write to it again, the original data is still there in the component.

If I want to start over with an empty XLS component to do a second file, or write over the original file, how do I do it without closing and reopening the application?

Using Delphi 5.

Re: Write multiple xls files without closing the program?

Posted: Mon Dec 15, 2014 12:45 pm
by larsa
Hello

Use: XLS.Clear;

Re: Write multiple xls files without closing the program?

Posted: Mon Dec 15, 2014 10:49 pm
by CJohnson
Hi Lars. On subsequent runs, I get a 'List index out of bounds' error when I assign values to a cell. It varies which cell it is I write to depending on the size of the data. Any ideas?

Re: Write multiple xls files without closing the program?

Posted: Tue Dec 16, 2014 8:03 pm
by CJohnson
I sorted it out just by dynamically creating the XLS.