SaveToStream Bug
Posted: Mon Feb 24, 2014 3:38 pm
hi
I'm using a empty workbook in excel97
when i'm save the file with SaveToStream the file is not valid for excel but i't ok with SaveToFile
To test:
test2.xls isn't valid , and test3.xls is valid
I'm using a empty workbook in excel97
when i'm save the file with SaveToStream the file is not valid for excel but i't ok with SaveToFile
To test:
Code: Select all
procedure TForm1.Button2Click(Sender: TObject);
var
S : TXLSWorksheet;
data : TMemorystream;
begin
XLSReadWriteII51.LoadFromFile(ExtractfilePath(ParamStr(0))+ 'empty.xls');;
s := XLSReadWriteII51.Add();
S.Name := 'tata';
S.AsString[1,0] := 'something';
data := TMemoryStream.Create;
XLSReadWriteII51.SaveToStream(data);
data.SaveToFile(ExtractfilePath(ParamStr(0))+ 'test2.xls');
XLSReadWriteII51.SaveToFile(extractfilePath(ParamStr(0))+ 'test3.xls');
end;