Page 1 of 1

Error when loading from stream

Posted: Mon Nov 28, 2011 4:49 pm
by FireWilley
I have a spreadsheet that gets the error message “%1 already exists” when I call the LoadFromStream procedure. However, if set the file name and read I do not get an error.

In other words if I do this:

XLSBook.Filename := 'C:\Delphi7\Conversions\Import105ASpreadsheet\bin\Form 105A.xlsx';
XLSBook.Read;

I do not get an error, but if I do this:

MS.LoadFromFile('C:\Delphi7\Conversions\Import105ASpreadsheet\bin\Form 105A.xlsx');
XLSBook.LoadFromStream(MS);

I get an error.

Is this a bug? Is there some work around?

Re: Error when loading from stream

Posted: Thu Dec 01, 2011 4:37 pm
by FireWilley
I found out the problem was caused by the presence of a object in the spreadsheet. Once the object was removed, the error went away. Is this a know issue with the TXLSReadWriteII4 component?