permaculture playing cards*
The moose likes Other Open Source Projects and the fly likes Apache POI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Apache POI" Watch "Apache POI" New topic

Apache POI

sonia pandit
Ranch Hand

Joined: Apr 19, 2008
Posts: 137
I need to open a file edit it and save it back. I need some sample code. Somebody in one of the other forums posted and example. It was just an incomplete snippet. The examples on the apache web site do not seem to work.


I tried the example and it does not do anything.
I am running it from eclipse. When I run it from the command line, I get
no classdef found error.

Can someone help me with some sample code to open an xls file as an excel file and edit it and write it back?


Srikkanth Mohanasundaram
Ranch Hand

Joined: Feb 07, 2007
Posts: 185

I could run this example without any problems. Add all the jar files in the classpath. (You are specifying a directory). I could get this done from eclipse, the example doesn't print anything on the console.But it created a file.

Take a look at HowToSetTheClasspath FAQ

subject: Apache POI
Similar Threads
How to read excel2007 file or both .xls and .xlsx files using apache poi
want to get more then 256 columns in XL using JXL API
Export to Excel via a servlet with POI not working under internet explorer 6
opening an xls file from the database in jsf
rendering JSP in XLS format