XLSX Export Problem

edoedo
edited 2:33AM in FastReport VCL 5
In Delphi XE2, Fast Report "5.2.11" when i export to xls there is no problem. When i export xlsx, while opening xlsx file i am getting a question:

"Excel found unreadable content in 'myfilename.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes."

What may be the problem is?

Comments

  • gpigpi
    edited 2:33AM
    First, try to use latest FR 5.3.11 build
    If error still exists - create support ticket and send your report template (fr3) and saved preview pages (fp3)
  • edoedo
    edited 2:33AM
    Thank you. I created a ticket and this problem (bug) is solved via changing component's source code. I'm told this problem will be solved in the next build.
  • gpigpi
    edited 2:33AM
    Modify frxExportXLSX.pas
    { row breaks }
    
    if SingleSheet and (FMatrix.PagesCount < 1025) and FExportPageBreaks then //change this line
    begin
    StrList := TStringList.Create;
    j := 0;
    
    for i := m.FirstRow to m.LastRow do
    if FMatrix.GetCellYPos(i) >= FMatrix.GetPageBreak(j) then
    begin
    StrList.Add(Format('<brk id="%d" max="16383" man="1"/>', [i]));
    Inc(j);
    end;
    
    WriteStr(ss, Format('<rowBreaks count="%d" manualBreakCount="%d">',
    [StrList.Count, StrList.Count]));
    
    StrList.SaveToStream(ss);
    WriteStr(ss, '</rowBreaks>');
    StrList.Free;
    end;
    

Leave a Comment