poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Zalewski <zalew...@optonline.net>
Subject RE: User Form Problems! Please help!
Date Fri, 24 Sep 2004 03:57:13 GMT
Not sure if this is the answer, but here goes...

This kind of problem might have to do with the fact that a User Form is on a
special kind of sheet (a DialogSheet). A DialogSheet has no rows or columns,
just controls. But POI HssfWorkbook.getSheet methods treat the retrieved
sheet as a WorkSheet.

In fact, there are 5 types of sheet in Excel.

WorkSheet - Has rows and columns, and is what you usually see when you work
with a spreadsheet
DialogSheet - has a user form on it. No rows or columns. Not useful without
a macro, which POI HSSF does not support
MacroSheet - Has rows and columns, but the contents of the rows and columns
are macro functions. It's a throwback to pre Excel 4, when there was no VBA
to do macros
IntlMacroSheet - Like a MacroSheet, but supports Unicode.
ChartSheet - Has a single chart, possibly along with other drawing objects.
Does not have rows or columns. Charts are usually placed inside a drawing
object, on a normal WorkSheet. But you can put a single chart on its own
tab. When you do this, you create a ChartSheet.

I think eventually the POI high level object model will have to be changed
to recognize these types of objects.

In summary, if you try to access the DialogSheet (where the user form is
placed) with POI, you are likely to encounter problems. You might try
creating all necessary sheets in your template, and not use any POI HSSF
APIs that modify the sheet table.

-----Original Message-----
From: Danny Mui [mailto:danny@muibros.com]
Sent: Thursday, September 23, 2004 3:28 PM
To: POI Users List
Subject: Re: User Form Problems! Please help!

hmm...try to reproduce the simplest case and send it up to bugzilla...
forms make rare occurrences in the files that are tested.

Jean, Victor [IT] wrote:
> The first time I insert data into a blank workbook with a userform the
output file is fine.
> However, when I use this outputfile to insert more data, that is where I
encounter the error.
>
> -----Original Message-----
> From: Danny Mui [mailto:danny@muibros.com]
> Sent: Thursday, September 23, 2004 11:10 AM
> To: POI Users List
> Subject: Re: User Form Problems! Please help!
>
>
> is it the data insertion approach the problem?  if you use a blank
> workbook, does this happen too?
>
> Jean, Victor [IT] wrote:
>
>>Hello!
>>
>>I'm having an issue when working with User Forms.
>>I've created a template spreadsheet containing a user form by starting the
visual basic editor and inserting my user form.  I then save this
spreadsheet and use POI to insert data into the template and generate a
output file.  Everything is fine up until here.  However,
>>when I use the output file generated as a template and try to insert more
data, I encounter the following error:
>>
>>"Error reading file block[ 0 ] already removed"
>>
>>
>>This is the process flow:
>>TemplateWorkbookWithUserForm --> POI Add Data into Cells -->
OutputWorkbookFileWithData
>>OutputWorkbookFileWithData   --> POI Add Data(ERROR)  -->
NewOutputWorkbookFileWithMoreData
>>
>>Can someone tell me what this error is and why I'm getting it ?
>>
>>
>>Thanks!
>>
>>-Victor
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: poi-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Mime
View raw message