You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by renisha <re...@gmail.com> on 2009/04/26 17:00:59 UTC

Open an excel in Struts application

Hi,

I am reading some values from database , doing some calculations and
creating an excel file.

In my action class , I am returning an HSSFWorkbook object and I need to
diaply the excel file as the output . Please let me know how do I get it
working .



-- 
View this message in context: http://www.nabble.com/Open-an-excel-in-Struts-application-tp23243002p23243002.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Open an excel in Struts application

Posted by Dave Newton <ne...@yahoo.com>.
Martin Gainty wrote:
> BTW: If you want Poi Action classes you will need the POI-plugin for Struts

Can you provide a link to the POI plugin?

Thanks,
Dave


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


Re: Open an excel in Struts application

Posted by mu...@aol.com.
 Here is the link to the discussion on Jasperforge 
http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=47545
I wasn't aware of a poi-plugin for Struts2 -- can't see it in the registry. I used the JasperReports plugin and the poi jar. You must have a different approach.



 


 

-----Original Message-----
From: Martin Gainty <mg...@hotmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Mon, 27 Apr 2009 8:02 am
Subject: RE: Open an excel in Struts application











which error is displayed?
can you show the logs?
BTW: If you want Poi Action classes you will need the POI-plugin for Struts

Thanks,
Martin 
______________________________________________ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de 
déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then 
we ask politely to report. Each unauthorized forwarding or manufacturing of a 
copy is inadmissible. This message serves only for the exchange of information 
and has no legal binding effect. Due to the easy manipulation of emails we 
cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit
 von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.






> To: user@struts.apache.org
> Subject: Re: Open an excel in Struts application
> Date: Sun, 26 Apr 2009 22:25:01 -0400
> From: musomesa@aol.com
> 
> When/if you use the JasperReports plugin use an older version of poi (3.0 is 
the latest I had success with). The new poi throws an exception which many have 
complained about but has not been fixed/
> Chris
> 
> 
> 
> -----Original Message-----
> From: renisha <re...@gmail.com>
> To: user@struts.apache.org
> Sent: Sun, 26 Apr 2009 1:30 pm
> Subject: Re: Open an excel in Struts application
> 
> 
> 
> 
> Thanks for your reply . I am using struts2 version. Could you please give me
> some sampl code if you have.
> 
> Wes Wannemacher wrote:
> > 
> > On Sunday 26 April 2009 11:00:59 am renisha wrote:
> >> Hi,
> >>
> >> I am reading some values from database , doing some calculations and
> >> creating an20excel file.
> >>
> >> In my action class , I am returning an HSSFWorkbook object and I need to
> >> diaply the excel file as the output . Please let me know how do I get it
> >> working .
> > 
> > 
> > Which version of Struts? 
> > 
> > I would suggest if you are using Struts 2, then take a look at the Jasper 
> > Reports plugin, there is XLS output from there.
> > 
> > -Wes
> > 
> > -- 
> > 
> > Wes Wannemacher
> > Author - Struts 2 In Practice 
> > Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> > http://www.manning.com/wannemacher
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/Open-an-excel-in-Struts-application-tp23243002p23244421.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.  
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_042009=



 


RE: Open an excel in Struts application

Posted by Martin Gainty <mg...@hotmail.com>.
which error is displayed?
can you show the logs?
BTW: If you want Poi Action classes you will need the POI-plugin for Struts

Thanks,
Martin 
______________________________________________ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.






> To: user@struts.apache.org
> Subject: Re: Open an excel in Struts application
> Date: Sun, 26 Apr 2009 22:25:01 -0400
> From: musomesa@aol.com
> 
> When/if you use the JasperReports plugin use an older version of poi (3.0 is the latest I had success with). The new poi throws an exception which many have complained about but has not been fixed/
> Chris
> 
> 
> 
> -----Original Message-----
> From: renisha <re...@gmail.com>
> To: user@struts.apache.org
> Sent: Sun, 26 Apr 2009 1:30 pm
> Subject: Re: Open an excel in Struts application
> 
> 
> 
> 
> Thanks for your reply . I am using struts2 version. Could you please give me
> some sampl code if you have.
> 
> Wes Wannemacher wrote:
> > 
> > On Sunday 26 April 2009 11:00:59 am renisha wrote:
> >> Hi,
> >>
> >> I am reading some values from database , doing some calculations and
> >> creating an excel file.
> >>
> >> In my action class , I am returning an HSSFWorkbook object and I need to
> >> diaply the excel file as the output . Please let me know how do I get it
> >> working .
> > 
> > 
> > Which version of Struts? 
> > 
> > I would suggest if you are using Struts 2, then take a look at the Jasper 
> > Reports plugin, there is XLS output from there.
> > 
> > -Wes
> > 
> > -- 
> > 
> > Wes Wannemacher
> > Author - Struts 2 In Practice 
> > Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> > http://www.manning.com/wannemacher
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/Open-an-excel-in-Struts-application-tp23243002p23244421.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.  
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_042009

Re: Open an excel in Struts application

Posted by Zoran Avtarovski <zo...@sparecreative.com>.
You can also use the plain old stream result type and pipe the HSSF
worksheet as you would any other file type. Saves on the overhead of another
unnecessary plugin.

Z.
> 
> 
> 
> When/if you use the JasperReports plugin use an older version of poi (3.0 is
> the latest I had success with). The new poi throws an exception which many
> have complained about but has not been fixed/
> Chris
> 
> 
> 
> -----Original Message-----
> From: renisha <re...@gmail.com>
> To: user@struts.apache.org
> Sent: Sun, 26 Apr 2009 1:30 pm
> Subject: Re: Open an excel in Struts application
> 
> 
> 
> 
> Thanks for your reply . I am using struts2 version. Could you please give me
> some sampl code if you have.
> 
> Wes Wannemacher wrote:
>> > 
>> > On Sunday 26 April 2009 11:00:59 am renisha wrote:
>>> >> Hi,
>>> >>
>>> >> I am reading some values from database , doing some calculations and
>>> >> creating an excel file.
>>> >>
>>> >> In my action class , I am returning an HSSFWorkbook object and I need to
>>> >> diaply the excel file as the output . Please let me know how do I get it
>>> >> working .
>> > 
>> > 
>> > Which version of Struts?
>> > 
>> > I would suggest if you are using Struts 2, then take a look at the Jasper
>> > Reports plugin, there is XLS output from there.
>> > 
>> > -Wes
>> > 
>> > -- 
>> > 
>> > Wes Wannemacher
>> > Author - Struts 2 In Practice
>> > Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
>> > http://www.manning.com/wannemacher
>> > 
>> > 
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> > 
>> > 
>> > 



Re: Open an excel in Struts application

Posted by mu...@aol.com.
When/if you use the JasperReports plugin use an older version of poi (3.0 is the latest I had success with). The new poi throws an exception which many have complained about but has not been fixed/
Chris



-----Original Message-----
From: renisha <re...@gmail.com>
To: user@struts.apache.org
Sent: Sun, 26 Apr 2009 1:30 pm
Subject: Re: Open an excel in Struts application




Thanks for your reply . I am using struts2 version. Could you please give me
some sampl code if you have.

Wes Wannemacher wrote:
> 
> On Sunday 26 April 2009 11:00:59 am renisha wrote:
>> Hi,
>>
>> I am reading some values from database , doing some calculations and
>> creating an excel file.
>>
>> In my action class , I am returning an HSSFWorkbook object and I need to
>> diaply the excel file as the output . Please let me know how do I get it
>> working .
> 
> 
> Which version of Struts? 
> 
> I would suggest if you are using Struts 2, then take a look at the Jasper 
> Reports plugin, there is XLS output from there.
> 
> -Wes
> 
> -- 
> 
> Wes Wannemacher
> Author - Struts 2 In Practice 
> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> http://www.manning.com/wannemacher
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Open-an-excel-in-Struts-application-tp23243002p23244421.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Open an excel in Struts application

Posted by renisha <re...@gmail.com>.
Thanks for your reply . I am using struts2 version. Could you please give me
some sampl code if you have.

Wes Wannemacher wrote:
> 
> On Sunday 26 April 2009 11:00:59 am renisha wrote:
>> Hi,
>>
>> I am reading some values from database , doing some calculations and
>> creating an excel file.
>>
>> In my action class , I am returning an HSSFWorkbook object and I need to
>> diaply the excel file as the output . Please let me know how do I get it
>> working .
> 
> 
> Which version of Struts? 
> 
> I would suggest if you are using Struts 2, then take a look at the Jasper 
> Reports plugin, there is XLS output from there.
> 
> -Wes
> 
> -- 
> 
> Wes Wannemacher
> Author - Struts 2 In Practice 
> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> http://www.manning.com/wannemacher
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Open-an-excel-in-Struts-application-tp23243002p23244421.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Open an excel in Struts application

Posted by Wes Wannemacher <we...@wantii.com>.
On Sunday 26 April 2009 11:00:59 am renisha wrote:
> Hi,
>
> I am reading some values from database , doing some calculations and
> creating an excel file.
>
> In my action class , I am returning an HSSFWorkbook object and I need to
> diaply the excel file as the output . Please let me know how do I get it
> working .


Which version of Struts? 

I would suggest if you are using Struts 2, then take a look at the Jasper 
Reports plugin, there is XLS output from there.

-Wes

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


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