Quantcast
Channel: Adobe Community : Popular Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 14291

cfspreadsheet problem with large datasets

$
0
0

We have been testing cfspreadsheet and are experienceing large processing times when usingSpreadsheetAddRows.

 

Here is a simple example:

 

<cfset newQuery = queryNew("Column_1, Column_2, Column_3, Column_4")>
<cfloop index="i" from="1" to="4000">
<cfset queryAddRow(newQuery)>
<cfset querySetCell(newQuery, "Column_1", i)>
<cfset querySetCell(newQuery, "Column_2", "0")>
<cfset querySetCell(newQuery, "Column_3", "0")>
<cfset querySetCell(newQuery, "Column_4", "0")>
</cfloop>

 

 

 


<!--- Create new spreadsheet Object and add a row with the column names (takes about 2 ms to run) --->
<cfset ssObj=Spreadsheetnew()>
<cfset SpreadsheetAddRow(ssObj,"Column_1, Column_2, Column_3, Column_4")>

 

<!---  Adds the rows from the query to the spreadsheet (takes about 15 min to run) --->
<cfset SpreadsheetAddRows(ssObj,newQuery)>

 

<!--- Write spreadsheet --->
<cfspreadsheet action="write" filename="#ExpandPath("./spreadsheets/spreadsheet.xls")#" name="ssObj" sheet=1 sheetname="Test" overwrite=true>

 

This is running on windows 2K8, IIS 7. I have tried updating Openoffice to 3.2 and also to the newest java SDK. My jrun process will go from 500MB to over 1 gig, and then chug along for 15 minutes before writing the final xls.


Viewing all articles
Browse latest Browse all 14291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>