Title:
Spreadsheet writing is changing column formatting for currently active sheet
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/Workaround
Reporter/Name(from Bugbase): Alan Holden / Alan Holden (Alan Holden)
Created: 06/18/2015
Components: Document Management, Office Integration
Versions: 11.0
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Few users will encounter
Locale/System: English / Windows 7
Vote Count: 0
Problem Description: Reading an existing xlsm multi-worksheet spreadsheet (with or without any interim process) will noticeably alter the look and layout of any worksheet which is set active at the time of writing.
Steps to Reproduce: 1) Examine the worksheets of the attached source file(*) prior to processing. Notice the similar format in each 'weekday tab'
2) Run the following CFML against the file (brackets removed for posting here):
cfspreadsheet action="read" src="#ExpandPath('./template_001_layout_120200.xlsm')#" sheet="1" name="sheetObj"
cfspreadsheet action="write" name="sheetObj" filename="#ExpandPath('./demoSpreadSheetBug.xlsm')#" overwrite="true"
3) Examine the resulting file saved by ColdFusion. Note how the first sheet ('Mon') has suffered from sheet & column resizing, etc in multiple places.
4) Inject the following cfscript between the two lines of code above to change the active sheet before writing:
SpreadsheetSetActiveSheetNumber (sheetObj, 2);
5) Example the resulting file and see how sheet 2 ('Tue') is now the victim of bad format karma. Repeat with different sheet attributes if desired.
Actual Result: Active sheet is formatted to an unintended appearance which makes customer angry.
Expected Result: All sheets would appear the same as in the file supplied by the happy customer.
Any Workarounds: Set the active sheet to one that has no format, or the customer does not care about, which unfortunately will also be the one they first see (eg 'Active') when opening the file in Excel or OpenOffice. Other than that, no other workaround has been found - without spending hours or days attempting to manipulate the file via direct invocation of the POI libraries.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4009541
External Customer Info:
External Company:
External Customer Name: Alan
External Customer Email:
External Test Config: My Hardware and Environment details: ColdFusion 11,0,05,293506 Enterprise (Developer)
Windows 7
OS Version 6.1
Update Level /C:/ColdFusion11/cfusion/lib/updates/chf11000005.jar
Adobe Driver Version 5.1.3 (Build 000094)
Java Version 1.8.0_25
Java Class Version 52.0
Error Occurred While Processing Request
The filename, directory name, or volume label syntax is incorrect
The error occurred in _report.cfm: line 389
Called from _report.cfm: line 67
Called from _report.cfm: line 1
Called from index.cfm: line 41
-1 : Unable to display error's location in a CFML template.
Attachments:
- June 19, 2015 00:00:00: 1_template_001_layout_120200.txt
Comments: