Adding multiple sheets to a xls file does not work.
Posted: Wed Mar 13, 2013 12:37 pm
Hi!
It seems that adding multiple sheets to a xls file does not work properly.
Sample code:
var
ExcelFile : TXLSReadWriteII5;
begin
ExcelFile := TXLSReadWriteII5.Create(nil);
ExcelFile.Filename := 'D:\output.xls';
ExcelFile.Version := Xc12Utils5.xvExcel97;
ExcelFile.Add;
ExcelFile.Add;
ExcelFile.Add;
ExcelFile.Write;
end.
The code works for xlsx files.
It is also not possible to rename a sheet:
ExcelFile.sheets[0].Name := 'test'; <- does not change the sheetname in xls files.
Any help would be apopreciated.
Thank you.
It seems that adding multiple sheets to a xls file does not work properly.
Sample code:
var
ExcelFile : TXLSReadWriteII5;
begin
ExcelFile := TXLSReadWriteII5.Create(nil);
ExcelFile.Filename := 'D:\output.xls';
ExcelFile.Version := Xc12Utils5.xvExcel97;
ExcelFile.Add;
ExcelFile.Add;
ExcelFile.Add;
ExcelFile.Write;
end.
The code works for xlsx files.
It is also not possible to rename a sheet:
ExcelFile.sheets[0].Name := 'test'; <- does not change the sheetname in xls files.
Any help would be apopreciated.
Thank you.