472 views

Description

Setting 'glide.export.excel.wrap_cells' to False does not allow to Export .xlsx format file with columns containing more than 255 characters

Steps to Reproduce

  1. Set glide.export.excel.wrap_cells to False.
  2. To see error logs, set glide.export.debug property to True.
  3. Create a form (Incident/Change), with a description greater than 255 characters. Or, you can add to any field to make characters more than 255.)
  4. On the Incident/Change table, go to List view, or go to Reports to generate all Active Incidents. Make sure the incident you created is active.
  5. Right-click on the table header, and select Export xlsx format.
  6. The file will download, but when it opens, it will show: The file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
  7. If you check the sys_logs, you will see the following error :

    The maximum column width for an individual cell is 255 characters.: java.lang.IllegalArgumentException: The maximum column width for an individual cell is 255 characters.: org.apache.poi.xssf.usermodel.XSSFSheet.setColumnWidth(XSSFSheet.java:2242)
    org.apache.poi.xssf.streaming.SXSSFSheet.setColumnWidth(SXSSFSheet.java:255)
    com.glide.processors.ExcelSpreadsheet.updateCellWidth(ExcelSpreadsheet.java:308)
    com.glide.processors.ExcelSpreadsheet.writeCell(ExcelSpreadsheet.java:296)
    com.glide.processors.ExcelSpreadsheet.writeRow(ExcelSpreadsheet.java:270)
    com.glide.processors.ExcelSpreadsheet.writeDocument(ExcelSpreadsheet.java:208)
    com.glide.processors.ExcelSpreadsheet.createDocument(ExcelSpreadsheet.java:177)
    com.glide.processors.ExcelSpreadsheet.createDocument(ExcelSpreadsheet.java:156)
    com.glide.generators.ExcelExporter.createDocument(ExcelExporter.java:85)
    com.glide.generators.ExcelExporter.generate(ExcelExporter.java:71)
    com.glide.generators.BackGroundGenerationThread.run(BackGroundGenerationThread.java:67)

 

Workaround

Set glide.export.excel.wrap_cells to True and auto-wrap the columns.


Related Problem: PRB916708

Seen In

Helsinki Patch 2

Fixed In

Istanbul Patch 7
Jakarta Patch 1
Kingston

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2017-10-31 14:30:41
Published:2017-04-10