• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Create and display the Excel file(.xls) using java (poi.jar)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Create and display the Excel file(.xls) using java (poi.jar)


  • Subject: Re: Create and display the Excel file(.xls) using java (poi.jar)
  • From: "pavan.jayam" <email@hidden>
  • Date: Thu, 24 Nov 2011 11:31:05 +0530

Hi,

The issue got resolved. Now i am downloading the excel file from the response

------------------------------------------------------------------------------------------------
HSSFWorkbook workbook = new HSSFWorkbook();
--------------------

--------Code here------

-------------------

ByteArrayOutputStream out = new ByteArrayOutputStream();
workbook.write(out);
byte[] b = out.toByteArray();


excelData = new NSData(b);

aResponse.setHeader("application/vnd.ms-excel", "Content-Type");
aResponse.setHeader("Content-Disposition", "attachment; filename="+file);
aResponse.appendContentData(excelData);

------------------------------------------------------------------------------------------------



pavan.jayam wrote:
Hi List,

My requirement is to create an excel sheet using java and i need to display the excel sheet in the client browser or need to provide an option to open with or save file option in the client window.

I am able to create an excel workbook using poi.jar with the collected data from database and i can store the excel file(.xls) in the web server. But i am unable to view/display the excel sheet in browser.

Regards,
Pavan J.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Create and display the Excel file(.xls) using java (poi.jar) (From: "pavan.jayam" <email@hidden>)

  • Prev by Date: Add multiple files as attachment to WOResponse
  • Next by Date: Re: Add multiple files as attachment to WOResponse
  • Previous by thread: Create and display the Excel file(.xls) using java (poi.jar)
  • Next by thread: Jenkins down?
  • Index(es):
    • Date
    • Thread