Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set up classpath in windowsXP for POI

 
shukla raghav
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written a program that reads MS excel file and captures cell data. I have used the POI api by apache. I loaded the necessary jars from the FTP mirror site : ftp://mirror.nyi.net/apache/poi/dev/. I am using Netbeans IDE. I added all the jars in my Project in Netbeans but still it does not recognize POI class names. I am using Windows XP. I DONT KNOW WHY IS IT HAPPENING. How should i set the class path. when i surfed the apache site this is what they tell to do. But I could not understand what they mean by this

The HSSF application is nothing more than a test for the high level API (and indirectly the low level support). The main body of its code is repeated above. To run it:

download the poi-alpha build and untar it (tar xvzf tarball.tar.gz)
set up your classpath as follows: export HSSFDIR={wherever you put HSSF's jar files} export LOG4JDIR={wherever you put LOG4J's jar files} export CLASSPATH=$CLASSPATH:$HSSFDIR/hssf.jar:$HSSFDIR/poi-poifs.jar:$HSSFDIR/poi-util.jar:$LOG4JDIR/jog4j.jar
type: java org.apache.poi.hssf.dev.HSSF ~/myxls.xls write

This should generate a test sheet in your home directory called "myxls.xls".

Type: java org.apache.poi.hssf.dev.HSSF ~/input.xls output.xls

This is the read/write/modify test. It reads in the spreadsheet, modifies a cell, and writes it back out. Failing this test is not necessarily a bad thing. If HSSF tries to modify a non-existant sheet then this will most likely fail. No big deal.


Please tell me in laymen terms what to do exacly
 
Maneesh Godbole
Saloon Keeper
Posts: 11196
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IDE specific.
Moving.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic