There has been considerable improvements in spreadsheet performance. We have done alot of internal code changes to improve this performance. Apart from internal changes we have also exposed something for users.

SpreadSheetWrite method and write action of cfspreadsheet tag now takes one more parameter 'autosize'.

By default now all the excel sheets have all their columns expanded and resized once they are written. Column expansion is a very expensive process which if avoided can save some valuable milliseconds.

Here is the syntax :

SpreadSheetWrite( ExcelInfo info, String filename, String password, boolean overWrite,Object autosize )

Autosize can be a boolean or an array

--> If it is boolean, true means expand/resize all the columns and false means do not expand/resize any column.

SpreadSheetWrite( info,filename,password, true,false )

--> If it is an array, it should be array of columnn numbers which you want to expand. 

<cfset arr= [1,2]>

<cfspreadsheet  action="write" filename = "test1.xlsx" name="store" autosize = "#arr#" overwrite=true>

 

By default value will be true for backward compatibility. We recommend users to keep it false


1 Comment to “Performance improvements in SpreadSheet”

  1. James Moberg
    I recently discovered that column sizes (using SpreadSheetSetColumnWidth) in ColdFusion 9/10 are ignored and auto-sized.
    https://twitter.com/gamesover/status/443183225528406016
    https://bugbase.adobe.com/index.cfm?event=bug&id=3616845

    Will this new flag be required to be explicitly set in order for SpreadSheetSetColumnWidth() to function properly?

    Will this new feature (bug fix) be updated in either ColdFusion 9 or 10 or will developers be required to purchase/license a new version of ColdFusion for SpreadSheetSetColumnWidth to function properly?

    Will ColdFusion 11 use Apache POI 3.10? (It has 92 bug fixes since the version used in Splendor.)
    https://twitter.com/gamesover/status/443212341786996736

    Thanks.

Leave a Comment

Leave this field empty: