Page 1 of 1

Damage of pivot table formats

Posted: Wed Nov 05, 2014 2:14 pm
by jsfkcz
Hello,
I have a simple template with 2 pivot tables.
The 1st one shows percentual values with default format with 2 decimal places.
The second one has only one decimal place changed by options in pivot table properties.
(Both tables update automatically with opening worksheet.)

Template:
Image
After write some value to the template, calculate and save the result has bad format at the second pivot table.
The first pivot table with defalut format of values is still ok.
Image

Code: Select all

    procedure TForm1.Button1Click(Sender: TObject);
    const
      cOrigFile = 'template.xlsx';
      cTestFile = 'result.xlsx';
    var
      ASheet: TXLSWorksheet;
    begin
      CopyFile(cOrigFile,cTestFile,False);
      xlsRW.Filename:= cTestFile;
      xlsRW.Read;
      ASheet:= xlsRW.SheetByName('Pivot');
      asheet.asinteger[2,0]:=1; // cell C1
      xlsRW.calculate;
      xlsRW.Write;
    end;
    end.
The template.xlsx and result.xlsx are at http://www.genet.cz/kohout/xlsrw/exampl ... format.zip for download.

Josef Kohout

Re: Damage of pivot table formats

Posted: Fri Nov 07, 2014 10:52 am
by larsa
Hello

This is fixed in update 5.20.40