here is my simple code:
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
(* XLS.Version is xvExcel2007; *)
XLS.Filename := 'c:\Temp.xlsx';
XLS.Sheets[0].AsString[1,1] := '1';
XLS.Sheets[0].AsString[1,2] := '2';
XLS.Sheets[0].AsFormula[1,3] := 'B2+B3';
XLS.Calculate;
XLS.Write;
end;
2) in windows, right-click and choose "print"
3) the Excel document is printed but a message from Excel asks me to save the temporary file
On the old 4 version, XLS.Calculate() was suggested in order to avoid this problem but is seems not working in version 5.
The same happens if I choose Excel 97 format.
My version is 5.20.15
Let me know, my task is to automatically generate 100+ files and print them in one shot like before.
Thanks & Regards,
Massimo