• Post Reply Bookmark Topic Watch Topic
  • New Topic

Excel Reporting  RSS feed

 
Padmanaban Jayabalan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The requirement is to show the report in the Excel. The tabular results are available in the browser. On click of the "Show Report" button, the values in the browser should be displayed in the excel.
One more point here is, when the user selects the multiple reports in the screen, the corresponding values should be taken from the database and display each report in each tab of the excel worksheet.
How to achieve this.
Any help for this would be very much appreciated
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A quick and dirty solution:
Write the values in csv-Format to a tmp-File.
John Doe; 100; beginner
Laura Soft; 700; professional
Susi Sorglos; 900; president
Then call Runtime...exec ("...path to excel", "tmpfile");
---
There is a OpenSource Project for dealing with Word and Excel,
POI and HSL - Poor Obfuscation Interface, and Horrible Stylesheet Language.
google for it.
 
Jorge Blaz
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With Excel 2002 you can save formatted data to an xml format called XML Spreadsheet(xmlss).
That means, you can have for example a formatted table within an excel file as an xml file following the XMLSS format.
So, if you have an XSL template with the format and an XML file with the data, you could use transformation and have a XMLSS file with both the data and the format. Then you can have a link to this file. People could download it, and then open it with Excel.
Here's a link to Microsoft's XMLSS reference.Microsoft xmlss reference
The advice is to first design the table in excel with all the formats and with sample data. Then save it as an xmlss format. And then you have to change it to an xsl that will be used with the generated xml file to do a transformation and have the xmlss file as a result.
Sorry for my bad explanation, but hope it helps :-)
 
Harsha Huddar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look into HSSF excel builder API from apache. Its very easy to use.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or search for Sylk (SLK). I've posted a coding example of a servlet outputting SLK data a while ago somewhere in the Saloon.
 
Yan Lee
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
If you need a lot of features like conditional locking or merging cells,
HSSF is a good solution.
Else, if you want to basically display data in a fairly simple format and want to go the XML way, you can use JasperReports.
Hope this helps.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!