Title:
Bug 87151:The function "spreadSheetSetColumnWidth" does not work with more than 256 columns in an Excel xlsx file
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): / CARSTEN MALINOWSKI (Vamseekrishna Nanneboina)
Created: 10/25/2011
Components: Language, Functions
Versions: 10.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,1,274733 / 280299
Priority/Frequency: Major / Most users will encounter
Locale/System: English / Platforms All
Vote Count: 0
Problem:
The function "spreadSheetSetColumnWidth" does not work with more than 256 columns in an Excel xlsx file. The xmlformat parameter for the spreadsheetNew() function is set to true to generate the an Excel file.
Method:
Please use this short snippet below to reproduce the problem. You will get an error that 257 is an invalid column index. Comment out the line with the spreadSheetSetColumnWidth() command to see that the generation of the file with more than 256 columns will work.<!--- Example that spreadSheetSetColumnWidth does not work with xmlFormat=true and more than 256 columns ---><cfset fileName = getDirectoryFromPath(getCurrentTemplatePath()) & "newSpreadsheet.xlsx" /> <cfset spreadsheet = spreadsheetNew("Expenses", true) /> <cfloop from="1" to="450" index="i"><cfset spreadsheetSetCellValue(spreadsheet, i, 1, i) /> <!--- comment out this line below and everything works fine ---><cfset spreadSheetSetColumnWidth(spreadsheet, i, 255) /></cfloop> <cfspreadsheet action="write" filename="#fileName#" name="spreadsheet" overwrite="true" />
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3084802
External Customer Info:
External Company:
External Customer Name: CARSTEN MALINOWSKI
External Customer Email: OLIVER.HELBIG@CETECOM.COM
External Test Config: 10/25/2011
Attachments:
Comments: