version 4 to 5: Xls.Calculate seems not working

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
maz65
Posts: 20
Joined: Sun Feb 09, 2014 6:52 pm

version 4 to 5: Xls.Calculate seems not working

Post by maz65 »

Hello Lars,
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;
1) create the file by pressing the button
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
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: version 4 to 5: Xls.Calculate seems not working

Post by larsa »

Hello

This will be fixed in the next update (5.20.23).
Lars Arvidsson, Axolot Data
maz65
Posts: 20
Joined: Sun Feb 09, 2014 6:52 pm

Re: version 4 to 5: Xls.Calculate seems not working

Post by maz65 »

Thanks Lars, waiting for the update. As today it is still 5.20.21.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: version 4 to 5: Xls.Calculate seems not working

Post by larsa »

Hello

The update is ready now.
Lars Arvidsson, Axolot Data
maz65
Posts: 20
Joined: Sun Feb 09, 2014 6:52 pm

Re: version 4 to 5: Xls.Calculate seems not working

Post by maz65 »

Hello Lars,
some months ago I tested with Excel 2007 and worked.
Now I re-tested with Excel 2007 and works.
Some users have Excel 2010 / 2013 and they claims the error is the same as post #1 here.

I check the generated files and seems a difference in headers:
- generated by XLSReadWrite “[Content_Types].xml”
- Excel 2013 “docProps/core.xml”

Let me know if can be helpful for you.
Apart of this, any file generated is ok in Excel 2010 / 2013.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: version 4 to 5: Xls.Calculate seems not working

Post by larsa »

Hello

I need a file/sample that reproduces the error.
Lars Arvidsson, Axolot Data
Post Reply