I am currently attempting to use POIFSFileSystem as static and creating new workbook instances using this static POIFSFileSystem object in my factory. Do you see any problem with this approach? The only problem I foresee is the open file handle.
I am wondering if it is feasible to override clone() in HSSFWorkbook itself (and making it public)? -----Original Message----- From: Danny Mui [mailto:[EMAIL PROTECTED] Sent: Monday, October 11, 2004 6:40 PM To: POI Users List Subject: Re: How to insert a record in excel when you populate data it makes changes to the instance data so you cant use statics. possibly closest thing to templating is to store the file data into an bytearrayinputstream and use that as your static source? (or something like that). if you do try this please let us know if there are any savings in time due to IO (doubt it's worth the effort?). Sharma, Siddharth wrote: > I'm blind as a bat to miss this in the api docs. > Thanks Danny. > > I am wondering what is the easiest way to create a clone of an HSSFWorkbook > instance. > I am reading an xls file once and instantiating this object. > On subsequent requests, I want to simply clone new instances and use them to > avoid having to read the excel file repeatedly. > I cannot invoke clone() since it is protected. > > > -----Original Message----- > From: Danny Mui [mailto:[EMAIL PROTECTED] > Sent: Monday, October 11, 2004 11:26 AM > To: POI Users List > Subject: Re: How to insert a record in excel > > i normally use the shiftrows functionality there. > > > Sharma, Siddharth wrote: > >>I am reading an existing excel file, (in other words, treating it as a >>template) and then inserting dynamic data in the template to generate the >>final excel workbook. >>The report is simple, in tabular form with summary totals at the end. >>This summary row (at the bottom) has certain formatting and static text > > that > >>I wish to keep from the template. But I cannot seem to find any method in >>HSSFSheet to insert a row rather than overwrite an existing one. >>So when I iterate over my dynamic data set and create rows, it overwrites >>the summary row at the bottom. >>I can create the summary row via POI, but before I do that, I am wondering >>if it's possible for that row to remain in the template. >> >>Thanks >>-Sid >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
