wood burning stoves 2.0*
The moose likes Java in General and the fly likes Pivot tables in Excel using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Pivot tables in Excel using Java" Watch "Pivot tables in Excel using Java" New topic
Author

Pivot tables in Excel using Java

Krish Srinivasan
Greenhorn

Joined: Mar 12, 2007
Posts: 2
Hi, Can anyone please let me know if pivot tables can be formed in Excel using Java ? Want to know if at all it is feasible. If it is, some pointers on how to.
We have a requirement to generate an excel file that should have the results in the form of a pivot table.

Any clue is appreciated.

Thanks
Krish
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7718
    
  20

Krish Srinivasan wrote:Hi, Can anyone please let me know if pivot tables can be formed in Excel using Java ? Want to know if at all it is feasible. If it is, some pointers on how to.
We have a requirement to generate an excel file that should have the results in the form of a pivot table.

Well, my first question would be: what are you using to generate your Excel files?

If Apache POI, then I'd suggest that you should probably search their docs for the phrase "pivot table".

If something more comprehensive, like OpenOffice, then the chances are quite good that you can (although I've never tried it) because their spreadsheet app also allows pivot tables (except that they call them Data Pilots); but you'll probably be limited as to the type of Excel file you can produce. I believe the latest is still Excel 97/2000.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Krish Srinivasan
Greenhorn

Joined: Mar 12, 2007
Posts: 2
Thanks Winston for your reply.

Well, we have been using JExcel API for all the applications we have done so far. And this requirement is for a new application. So, we can decide which one to go with and that shouldn't be a problem.

I checked Apache POI and that didn't help. I found this in their site. [http://poi.apache.org/spreadsheet/limitations.html]

I haven't heard about OpenOffice but I will check that out.

Right now, I don't see many options to choose from to do this pivot table in Java. There is one called SmartXLS (not an open source) and I am checking that out as well..

Thanks
 
wood burning stoves
 
subject: Pivot tables in Excel using Java