XLSX Export Problem

edoedo
edited 5:38AM 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 5:38AM
    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 5:38AM
    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 5:38AM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.