Write multiple xls files without closing the program?

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
CJohnson
Posts: 4
Joined: Tue Oct 28, 2014 9:25 pm

Write multiple xls files without closing the program?

Post 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.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Write multiple xls files without closing the program?

Post by larsa »

Hello

Use: XLS.Clear;
Lars Arvidsson, Axolot Data
CJohnson
Posts: 4
Joined: Tue Oct 28, 2014 9:25 pm

Re: Write multiple xls files without closing the program?

Post 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?
CJohnson
Posts: 4
Joined: Tue Oct 28, 2014 9:25 pm

Re: Write multiple xls files without closing the program?

Post by CJohnson »

I sorted it out just by dynamically creating the XLS.
Post Reply