Status/Resolution/Reason: Closed/Withdrawn/NotABug
Reporter/Name(from Bugbase): Neil Liggett / Neil Liggett (Neil Liggett)
Created: 09/17/2015
Components: Document Management, Office Integration
Versions: 11.0
Failure Type: Data Corruption
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 0
Problem Description: Data inserted into a spreadsheet object, cell values with leading zeros, the leading zeros are completely removed even though the cells/columns/rows is set to be formatted as text. Tried formatting the data with functions: SpreadsheetFormatColumn(s), SpreadsheetFormatRow(s) before and after setting the values, but the leading zeros are still removed
Steps to Reproduce:
Below is a simple reproduction of the issue:
<cfset value = "00123456">
<cfset xlsx = SpreadsheetNew("Test",true)>
<cfset SpreadsheetFormatColumn(xlsx,{dataformat="@"},1)>
<cfset SpreadsheetSetCellValue(xlsx,value,1,1)>
<cfspreadsheet action="write" filename="#GetDirectoryFromPath(GetCurrentTemplatePath())#Test.xlsx" name="xlsx" overwrite="yes">
Actual Result:
After opening Test.xlsx, the column format is Text, but the zeros are removed.
Cell A1 = 123456
Expected Result:
The expected result in Test.xlsx Cell A1 = 00123456
Any Workarounds:
The only way I've been able to keep the leading zeros is by using the SpreadsheetFormatCell or SpreadsheetFormatCellRange functions prior to the value of the cell being set.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4058810
External Customer Info:
External Company:
External Customer Name: Neil Liggett
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
- September 18, 2015 00:00:00: 1_Excel_Results.PNG
Comments: