Excel xlsx export problem for background color = clBtnFace

Hello

We use FastReport VCL 5.3.14 Prof / XE6

Exporting controls with clBtnFace background color to XLSX results in black Excel cells.

1. Set background color of TfrxMemoView control to clBtnFace
2. Preview of the report -> ok
3. Export to Excel XLSX -> Excel cell has black background color -> contents is not readable anymore

Please see attached PDF and sample project.

Best regards
Tom

Comments

  • gpigpi
    edited 1:50AM
    Modify frxOfficeOpen.pas:
    uses Windows;
    
    function RGBSwap(c: TColor): TColor;
    var
    rgb: array[0..2] of Byte;
    i: Integer;
    begin
    if c < 0 then //add
    c := GetSysColor(c and $000000FF); //add
    for i := 0 to 2 do
    begin
    rgb[i] := c and $ff;
    c := c shr 8;
    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.