File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 237

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

I agree. Here's the link:
subject: Apache POI
It's not a secret anymore!