Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Ian Clark / Ian Clark (Ian Clark)
Created: 07/20/2015
Components: Document Management, Office Integration
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final / CF11 Update7
Priority/Frequency: Normal / Some users will encounter
Locale/System: English / Solaris All
Vote Count: 0
Problem Description: We have a nightly scheduled job that provides information on fund accounts. There are two spreadsheets created in a single work book. The first has the current fund balances and the second has the detailed transactions. This has been in production for over 5 years and until recently we have never had an issue. When we moved to cold fusion 11 we noticed that the formatting was all messed up but the workbooks continued to be produced. Recently we have been getting errors with this Message The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook.
Looking at the data we have 594 rows and we only format one column. Looking back over time we have had over 1,200 rows with no problem when we were on cold fusion 9. Removing all formatting commands still throws the same message on cfspreadsheet action ="update" if there are over 500 rows.
This is the basic code:
<cfscript>
//Create two empty ColdFusion spreadsheet objects. --->
theSheet = SpreadsheetNew("Funds Balances");
theSecondSheet = SpreadsheetNew("Funds Detail");
//<!--- Create header row --->
SpreadsheetAddRow(theSheet, "FY,COHORT,ALLOTMENT AMT,USED AMT,AVAILABLE AMT");
SpreadsheetFormatRow(theSheet, {alignment="center"}, "1");
SpreadsheetAddRow(theSecondSheet, "COHORT,EFFECTIVE DATE,LOAN NMB,TRANSACTION AMT,TRANSACTION TYPE,ELIPS,FUNDED DATE");
SpreadsheetFormatRow(theSecondSheet, {alignment="center"}, "1");
//Populate each object with a query. --->
SpreadsheetAddRows(theSheet,getFundsBal);
SpreadsheetFormatColumn(theSheet, {alignment="right",dataformat="$####,####0.00"}, "3");
SpreadsheetFormatColumn(theSheet, {alignment="right",dataformat="$####,####0.00"}, "4");
SpreadsheetFormatColumn(theSheet, {alignment="right",dataformat="$####,####0.00"}, "5");
SpreadsheetAddRows(theSecondSheet,getFundsDetail);
SpreadsheetFormatColumn(theSecondSheet, {alignment="right",dataformat="$####,####0.00"}, "4");
</cfscript>
<cfspreadsheet action="write" filename="#theFile#" name="theSheet"
sheetname="Funds Balances" overwrite=true>
<cfspreadsheet action="update" filename="#theFile#" name="theSecondSheet"
sheetname="Funds Detail">
if I place the second one into a new spreadsheet this error does not occur. It looks like the the action is applying cell format styles to each cell in the new spreadsheet. Even if I remove the formatting lines it still will display the same error.
Steps to Reproduce:
Create 2 spreadsheet objects and two queries one with 10 rows and 6 columns another with over 500 rows and 7 columns (two of which are dates)
Create a new work book with the smaller query and then update it to add a spreadsheet with the second query.
Actual Result:
Cold fusion error generated
Expected Result:
Excel workbook with two tabs.
Any Workarounds:
Had to limit workbooks to a single sheet and create multiple workbooks of 500 rows at a time.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4022999
External Customer Info:
External Company:
External Customer Name: Ian
External Customer Email:
External Test Config: My Hardware and Environment details:
Oracle Solaris 10, Coldfusion 11, Apache
Attachments:
Comments: