My previous code was only writing the new rows, it was not copying the tabs
from the template.
Here is the adjustment of my code:

        <cffile action="COPY" source="#filepathtemplate#"
destination="#filepath#" />
        
        
        <cfset xlsFileTemplate =
createObject("java","java.io.FileInputStream").init(filepathtemplate) />
        <cfset templateWorkbook =
createObject("java","org.apache.poi.xssf.usermodel.XSSFWorkbook").init(xlsFileTemplate)
/>
        
               
        <cfset writeableWorkbook =
createObject("java","org.apache.poi.xssf.streaming.SXSSFWorkbook").init(templateWorkbook,
1000) />
        <cfset cellStyleStatic =
createObject("java","org.apache.poi.xssf.usermodel.XSSFCellStyle") />
        <cfset region =
createObject("java","org.apache.poi.ss.util.CellRangeAddress") />

I check the SSPerformanceTest example from here:
http://poi.apache.org/faq.html#faq-N10109
I cannot use this because xls is limited to 64K rows. But it will be great
if i can write 50K rows in 3 secs.
Please expert, check my code and let me know if I can improved anything.
Thanks !




--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Create-an-excel-file-using-template-tp5717313p5717327.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to