tracker issue : CF-4207164

select a category, or use search below
(searches all categories and all time range)
Title:

spreadsheetRead/write functionality damages spreadsheet formatting

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): David R. / ()

Created: 02/15/2020

Components: Document Management, Spreadsheet

Versions: 2018

Failure Type: Data Corruption

Found In Build/Fixed In Build: CF2018 Update 7 / docs

Priority/Frequency: Normal / Unknown

Locale/System: English / Windows 10

Vote Count: 0

Problem Description:
spreadSheetRead followed by a spreadSheet write ruins the spreadsheet's formatting, in particular columns are set to what appears to be the size required to contain their text, even if they originally were set to some explicit width value; additionally, and probably related, images are resized.

Steps to Reproduce:
Load an XLSX spreadsheet with spreadsheetRead and immediately write it to an arbitrary new location with spreadsheetWrite.

Actual Result:
Newly written spreadsheet file has damaged column widths and image sizes.

Expected Result:
Newly written spreadsheet file has NO CHANGE from the original.

Any Workarounds:

Coincidentally this would be a great time to upgrade users to Apache POI 4, with support for Java 11.

Attachments:

Comments:

My copy of CF2018 is using Apache POI 3.17. Outside of CF using POI 3.17 and Java 8 I was unable to reproduce the problem - what was read in was written back out - so Apache seems to be working. Unfortunately we can't use POI explicitly from within CF because cf2018 is running on Java11, and there are some bugs in POI 3.17 when flushing to disk on Java 11 (see http://apache-poi.1045710.n5.nabble.com/Bug-63270-New-Issue-related-to-ClassCastException-which-we-are-facing-while-using-poi-3-15-along-wit-td5733011.html).
Comment by David R.
33127 | February 15, 2020 01:13:08 AM GMT
this is a result of autosize=true being the default, which is not a documented fact on https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-s/spreadsheetwrite.html. So this bug report is essentially a documentation bug report.
Comment by David R.
33128 | February 15, 2020 01:52:59 PM GMT