On 6/25/03 2:10 PM, "Humphrey, Jack" <[EMAIL PROTECTED]> wrote:
> Andrew, > > Thanks for the help. FYI, after changing some of the default capacities on > the performance-branch, I achieved a 60% reduction in memory utilization. > Being able to give hints in a future version will be very important. > > Another question. My application will be generating data-only spreadsheets > with no formulas and no references. My understanding is that the whole > spreadsheet needs to be kept in memory before writing out because of the > backwards references in HSSF. Does that refer to cell value references or > something lower level? I'm wondering if, for data-only spreadsheets like > mine, it would be possible to implement an event-driven > spreadsheet-streaming interface. I would provide some kind of data source > object and the writing code would query it for cell values and formatting as > it writes. Is that theoretically possible? > Nope, its absolutely impossible. The outer-lying POIFS (OLE2CDF) structures have UPSTREAM pointers to DOWNSTREAM objects. The under-lying HSSF (Workbook object) stream has upstream pointers to downstream objects. So even if it could be done in the Workbook (HSSF), you'd need to know the blocksize and block location before sending the header for the encapsulating archive. If it could be done there, you'd have the Workbooks stream having an object that points to the offsets of the sheets in the workbook object. So the short answer: no. Long answer: Swap files, memory mapping, etc. But not event-driven. Lets move this to the develoeprs list -Andy > ++Jack++ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Andrew C. Oliver http://www.superlinksoftware.com/poi.jsp Custom enhancements and Commercial Implementation for Jakarta POI http://jakarta.apache.org/poi For Java and Excel, Got POI? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
