You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Jim Biancolo <ji...@biancolo.com> on 2004/09/10 19:02:43 UTC

Issues Reading WB w/ Drop Down?

Hi folks,

Are there any known issues regarding reading workbooks that contain drop 
downs?  This code fails on the third line:

   fileIn=createObject("java","java.io.FileInputStream").init("#web_up_dir#\#fn#");
   fs=createObject("java","org.apache.poi.poifs.filesystem.POIFSFileSystem").init(fileIn);
   wb=createObject("java","org.apache.poi.hssf.usermodel.HSSFWorkbook").init(fs);

The workbook in question has 5 sheets with moderate formatting.  One sheet 
has a drop down on it.  When I remove the drop down and make no other 
changes, the code works fine.  Note that I am using POI 2.5, invoked from 
Cold Fusion.

Thanks!

Jim


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


Re: help needed: 500 internal server error

Posted by Danny Mui <da...@muibros.com>.
you're going to have to play with the content-disposition headers. this 
lets you set the filename to display and to determine how it behaves 
(open in current window or attachment).  my preference is to use 
attachment as it is more reliable.



Steve wrote:
> thanks. we now don't use a static method, and it now WORKS!
> 
> However, we have another problem (or two). If we produce an excel report
> it opens in a new browser. Then, with the first one still open, we produce
> another excel report,
> and we want it to open in another new browser window. However,
> what happens is that the first excel browser window goes blank,
> and the second excel browser window shows the original first
> excel report. This happens on Windows NT.
> 
> Related to this, on my other computer with Windows XP, the
> excel report opens in Excel (first with a dialog box to open or save).
> It shows Excel.jsp [Read Only] (though it is not read only). If we
> produce a new excel report on this computer, with the first one
> still open, we don't get a new prompt box. All we get is that we
> see the original excel report, and not the new one.
> 
> Any help would be appreciated.
> THANKS,
> Steve
> 
> ----- Original Message ----- 
> From: "Danny Mui" <da...@muibros.com>
> To: "POI Users List" <po...@jakarta.apache.org>
> Sent: Thursday, September 23, 2004 11:06 AM
> Subject: Re: help needed: 500 internal server error
> 
> 
> 
>>internal server error means so many things, so it's hard to help you
>>with that information alone.
>>
>>when you say crashed, does the application server go down?
>>
>>i don't think using a static work is a good idea, I forgot the actual
>>explanations but it was discussed in the lists in the past.  Have you
>>tested this approach with multiple concurrent users?
>>
>>Steve wrote:
>>
>>>i am calling a static method that first creates a new HSSFWorkbook
>>>and then adds 12 sheets, and sets the orientation, and does a couple
>>>of more things. It's like a template; no data is added. Report creation
>>>would follow.
>>>
>>>It works fine on my PC with weblogic, and it works on a unix machine.
>>>That is, my completed Excel report pops up in a browser or in Excel
>>>depending on which PC I use.
>>>
>>>The problem is that when deployed on our second unix server, it
>>>crashed with 500 internal server error, at the point where the
>>>POI api is being used to create a new workbook.
>>>
>>>We checked that the permissions on the directory where the poi jar
>>>file is. They were not the same, so we made them both 777.
>>>
>>>"Something" must be different, but I don't have a clue as to where to
>>>look.
>>>
>>>Any suggestions would be appreciated. I'm using poi 2.5 final of
> 
> 3/2/2004.
> 
>>>THANKS,
>>>Steve
>>>
>>>---------------------------------------------------------------------
>>>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


Re: help needed: 500 internal server error

Posted by Steve <st...@Basit.COM>.
thanks. we now don't use a static method, and it now WORKS!

However, we have another problem (or two). If we produce an excel report
it opens in a new browser. Then, with the first one still open, we produce
another excel report,
and we want it to open in another new browser window. However,
what happens is that the first excel browser window goes blank,
and the second excel browser window shows the original first
excel report. This happens on Windows NT.

Related to this, on my other computer with Windows XP, the
excel report opens in Excel (first with a dialog box to open or save).
It shows Excel.jsp [Read Only] (though it is not read only). If we
produce a new excel report on this computer, with the first one
still open, we don't get a new prompt box. All we get is that we
see the original excel report, and not the new one.

Any help would be appreciated.
THANKS,
Steve

----- Original Message ----- 
From: "Danny Mui" <da...@muibros.com>
To: "POI Users List" <po...@jakarta.apache.org>
Sent: Thursday, September 23, 2004 11:06 AM
Subject: Re: help needed: 500 internal server error


> internal server error means so many things, so it's hard to help you
> with that information alone.
>
> when you say crashed, does the application server go down?
>
> i don't think using a static work is a good idea, I forgot the actual
> explanations but it was discussed in the lists in the past.  Have you
> tested this approach with multiple concurrent users?
>
> Steve wrote:
> > i am calling a static method that first creates a new HSSFWorkbook
> > and then adds 12 sheets, and sets the orientation, and does a couple
> > of more things. It's like a template; no data is added. Report creation
> > would follow.
> >
> > It works fine on my PC with weblogic, and it works on a unix machine.
> > That is, my completed Excel report pops up in a browser or in Excel
> > depending on which PC I use.
> >
> > The problem is that when deployed on our second unix server, it
> > crashed with 500 internal server error, at the point where the
> > POI api is being used to create a new workbook.
> >
> > We checked that the permissions on the directory where the poi jar
> > file is. They were not the same, so we made them both 777.
> >
> > "Something" must be different, but I don't have a clue as to where to
> > look.
> >
> > Any suggestions would be appreciated. I'm using poi 2.5 final of
3/2/2004.
> >
> > THANKS,
> > Steve
> >
> > ---------------------------------------------------------------------
> > 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


Re: help needed: 500 internal server error

Posted by Danny Mui <da...@muibros.com>.
internal server error means so many things, so it's hard to help you 
with that information alone.

when you say crashed, does the application server go down?

i don't think using a static work is a good idea, I forgot the actual 
explanations but it was discussed in the lists in the past.  Have you 
tested this approach with multiple concurrent users?

Steve wrote:
> i am calling a static method that first creates a new HSSFWorkbook
> and then adds 12 sheets, and sets the orientation, and does a couple
> of more things. It's like a template; no data is added. Report creation
> would follow.
> 
> It works fine on my PC with weblogic, and it works on a unix machine.
> That is, my completed Excel report pops up in a browser or in Excel
> depending on which PC I use.
> 
> The problem is that when deployed on our second unix server, it
> crashed with 500 internal server error, at the point where the
> POI api is being used to create a new workbook.
> 
> We checked that the permissions on the directory where the poi jar
> file is. They were not the same, so we made them both 777.
> 
> "Something" must be different, but I don't have a clue as to where to
> look.
> 
> Any suggestions would be appreciated. I'm using poi 2.5 final of 3/2/2004.
> 
> THANKS,
> Steve
> 
> ---------------------------------------------------------------------
> 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


help needed: 500 internal server error

Posted by Steve <st...@Basit.COM>.
i am calling a static method that first creates a new HSSFWorkbook
and then adds 12 sheets, and sets the orientation, and does a couple
of more things. It's like a template; no data is added. Report creation
would follow.

It works fine on my PC with weblogic, and it works on a unix machine.
That is, my completed Excel report pops up in a browser or in Excel
depending on which PC I use.

The problem is that when deployed on our second unix server, it
crashed with 500 internal server error, at the point where the
POI api is being used to create a new workbook.

We checked that the permissions on the directory where the poi jar
file is. They were not the same, so we made them both 777.

"Something" must be different, but I don't have a clue as to where to
look.

Any suggestions would be appreciated. I'm using poi 2.5 final of 3/2/2004.

THANKS,
Steve

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


Re: Issues Reading WB w/ Drop Down?

Posted by Glen Stampoultzis <gs...@iinet.net.au>.
This patch has now been committed to CVS HEAD.

At 09:16 PM 17/09/2004, you wrote:
>Just a quick follow-up:  looks like I ran afoul of this bug:
>
>    http://issues.apache.org/bugzilla/show_bug.cgi?id=27929
>
>... and the associated patch (ObjRecord-patch27929.java) seems to solve it.
>
>Jim
>
>At 01:02 PM 9/10/2004, you wrote:
>>Hi folks,
>>
>>Are there any known issues regarding reading workbooks that contain drop 
>>downs?  This code fails on the third line:
>>
>>fileIn=createObject("java","java.io.FileInputStream").init("#web_up_dir#\#fn#");
>>fs=createObject("java","org.apache.poi.poifs.filesystem.POIFSFileSystem").init(fileIn);
>>wb=createObject("java","org.apache.poi.hssf.usermodel.HSSFWorkbook").init(fs);
>>
>>The workbook in question has 5 sheets with moderate formatting.  One 
>>sheet has a drop down on it.  When I remove the drop down and make no 
>>other changes, the code works fine.  Note that I am using POI 2.5, 
>>invoked from Cold Fusion.
>>
>>Thanks!
>>
>>Jim
>>
>>
>>---------------------------------------------------------------------
>>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
>


Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/

Re: Issues Reading WB w/ Drop Down?

Posted by Jim Biancolo <ji...@biancolo.com>.
Just a quick follow-up:  looks like I ran afoul of this bug:

    http://issues.apache.org/bugzilla/show_bug.cgi?id=27929

... and the associated patch (ObjRecord-patch27929.java) seems to solve it.

Jim

At 01:02 PM 9/10/2004, you wrote:
>Hi folks,
>
>Are there any known issues regarding reading workbooks that contain drop 
>downs?  This code fails on the third line:
>
> 
>fileIn=createObject("java","java.io.FileInputStream").init("#web_up_dir#\#fn#");
> 
>fs=createObject("java","org.apache.poi.poifs.filesystem.POIFSFileSystem").init(fileIn);
> 
>wb=createObject("java","org.apache.poi.hssf.usermodel.HSSFWorkbook").init(fs);
>
>The workbook in question has 5 sheets with moderate formatting.  One sheet 
>has a drop down on it.  When I remove the drop down and make no other 
>changes, the code works fine.  Note that I am using POI 2.5, invoked from 
>Cold Fusion.
>
>Thanks!
>
>Jim
>
>
>---------------------------------------------------------------------
>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