Error when loading from stream
Posted: Mon Nov 28, 2011 4:49 pm
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?
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?