Yegor wrote a proof of concept called BigGridDemo (http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java) that, as far as I understand it, streams the data into a temporary file and then 'merges' that data into a worksheet. I do not know how far this technique has been developed yet but there are other list members who have used the technique to create large worksheet files successfully. It does however work only for the newer xml based file format introduced in Office2007.
Yours Mark B 亮 严 wrote: > > > Hi guys, > Thanks for your replies. That is great help for me. > > Mark B, > XSSF spends more memory than HSSF, in creating a same content excel file. > If there is a better way to handle writing large file using XSSF, I'd like > to have a try. > Would you please to tell me how i can do that using XSSF? > > Thanks! > Yan > >> Date: Tue, 26 Jan 2010 09:07:34 -0800 >> From: [email protected] >> To: [email protected] >> Subject: Re: What's the best way to use poi to create large excel files? >> >> >> I am assuming that you are interested only in creating binary (.xls) >> files >> and are not targetting the newer xml based ones (.xlsx). If this is the >> case >> then no, there is not a better way I am sorry to say. The reason lies in >> the >> file format itself; briefly, the xls file consists of a series of streams >> of >> data and pointers to various locations in the file, all of it block >> structured. It is not possible to determine how the file should be sorted >> into blocks nor to calculate the pointers until all of the data for the >> file >> has been accumulated and so, it is not possible to write .xls files out >> to >> memory in smaller chunks. >> >> Yours >> >> Mark B >> >> >> Yan wrote: >> > >> > >> > Hi guys, >> > From the docs on the poi web site. I know we can use >> > org.apache.poi.hssf.usermodel.HSSFWorkbook to create excel 2003 file, >> like >> > HSSFWorkbook workbook = new HSSFWorkbook(); And use >> > workbook.write("test.xls") to generate the excel file. If you want to >> have >> > a low memory cost only to read excel file, you can use eventmodel. >> > But if i will create a large excel file, it will cost a lot memory to >> get >> > the whole workbook object ready before writing to file using >> > workbook.write("***") . What's the best way to use poi to create large >> > excel files? I donot think it is the best way to set a large heap of >> jvm. >> > Need your help. Thanks! >> > >> > Your friend >> > Yan >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > _________________________________________________________________ > Windows Live: Friends get your Flickr, Yelp, and Digg updates when they > e-mail you. > http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010 > -- View this message in context: http://old.nabble.com/What%27s-the-best-way-to-use-poi-to-create-large-excel-files--tp27323785p27335121.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]
