Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartGWTEE 12.0p - ListGrid export to OOXML not including hilites background color

    isc Version: v12.0p_2019-07-02/Enterprise Deployment
    GWT Version: 2.7.0
    Browser: Chrome 75.0.3770.100 (Official Build) (64-bit)
    OS: Windows 10
    SuperDevMode

    Hi, I am seeing an issue when trying to export a ListGrid with hilites. Text color is sometimes exported successfully, but background color and icon information are not coming through. Here are steps to reproduce this using the "Formatted Exports (Declared Formats)" sample from the showcase.

    1. Modify FormattedExportBuiltinSample.java to enable hilites.
    Code:
    final ListGrid orderListGrid = new ListGrid();
    orderListGrid.setWidth100();
    orderListGrid.setAlternateRecordStyles(true);
    orderListGrid.setDataSource(dataSource);
    orderListGrid.setAutoFetchData(true);
    
    //Add this line
    orderListGrid.setCanEditHilites(true);
    2. Start the showcase and go to http://127.0.0.1:8888/index.html#for...export_builtin

    3. Add a hilite for the first row (Order ID = 514) setting the text color, background color, and icon. Apply to all fields.
    Click image for larger version  Name:	hilites_1.jpg Views:	1 Size:	76.6 KB ID:	258395

    4. Confirm the hilite displays in the grid, select the XLSX/OOXML file format, and export.
    Click image for larger version  Name:	hilites_2.jpg Views:	2 Size:	218.7 KB ID:	258397

    5. Download the exported spreadsheet and view it in Excel or OpenOffice Calc. For me, it does not display the expected hilite formatting, though the Order Date field does receive the correct text color.

    Click image for larger version  Name:	hilites_3.jpg Views:	1 Size:	67.3 KB ID:	258398

    Can you let me know if this is a legitimate issue or if I am just misunderstanding the expected behavior of the client export feature?
    Thanks!
    Attached Files
    Last edited by jbrasee_iqs; 12 Aug 2019, 09:25.

    #2
    There's no way for us to include the icon in the export, however, we do include hilite backgroundColors (see the precedence rules for export of background color).

    What we'd guess is that the background color is included in the OOXML but your particular versions of spreadsheet software are just ignoring it.

    1. What versions are you using?

    2. If you edit the cell can you see that background color has been configured?

    3. Do you perhaps have a global setting that disables background color changes?

    4. Do you see the same problem if you use another machine, or something like Google Sheets?

    Comment


      #3
      Firstly, I found that the issue with text color not being set in some columns was due to my needing to call orderListGrid.setExportRawNumbers(false), so that can be disregarded, sorry!

      For background color:

      My Excel version is Excel for Office 365 MSO (16.0.11727.20222) 32-bit. I also tried OpenOffice Calc v4.1.6, and imported it into Google Sheets today with the same result.

      I edited the cell in Excel and confirmed that the background color does display, as the "Pattern Color" with an empty pattern style. The background color is set to "No Color". If I change the pattern style to something besides blank, it does show my selected color in the pattern.

      Spreadsheet created by SmartGWT 12.0
      Click image for larger version  Name:	bgColor_v12.0.jpg Views:	1 Size:	268.0 KB ID:	258411

      Out of curiosity I went ahead and did the same steps in SmartGWT 6.0 (minus the "setExportRawNumbers" call which doesn't exist in that version) and in Excel the background colors are displayed in the exported spreadsheet. Inspecting the cell I see that the color is set as a custom Background Color, and Pattern Color is left as the default. I also confirmed that the background color displays in OpenOffice Calc and Google Sheets.

      Spreadsheet created by SmartGWT 6.0
      Click image for larger version  Name:	bgColor_v6.0.jpg Views:	1 Size:	271.7 KB ID:	258412

      When I have an opportunity I will also take a look on another computer to make sure this isn't a localized issue.
      Last edited by jbrasee_iqs; 3 Jul 2019, 10:25.

      Comment


        #4
        This is fixed and will be available for download in nightly builds since July 5 (tomorrow). Let us know please how it worked for you.

        Comment


          #5
          Confirmed it's working with v12.0p_2019-07-05 -- thanks!

          Comment

          Working...
          X