You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Sierra Bravo <si...@gmail.com> on 2009/08/18 19:21:19 UTC
Woes trying to compile a .java file with POI
Dear all
I've been trying to get a .java file compiled with POI. Running Java 1.6 on
Jaunty, I've tried various combinations of the following (with all the three
jar files, both using the command line switch and the CLASSPATH environment
variable):
$ javac -classpath /home/s1b/xls/poi-3.2-FINAL-20081019.jar ReadXls.java
ReadXls.java:1: package org.apache.poi.xssf.usermodel does not exist
import org.apache.poi.xssf.usermodel.*;
^
ReadXls.java:2: package org.apache.poi.ss.usermodel does not exist
import org.apache.poi.ss.usermodel.*;
^
ReadXls.java:3: package org.apache.poi.ss.util does not exist
import org.apache.poi.ss.util.CellRangeAddress;
(And 13 more of not being able to locate the class files)
Thanks in advance...
s1b
--
View this message in context: http://www.nabble.com/Woes-trying-to-compile-a-.java-file-with-POI-tp25029537p25029537.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Woes trying to compile a .java file with POI
Posted by Sierra Bravo <si...@gmail.com>.
Thanks again, Dave.
For those who want to get started off immediately, here is a quick-and-dirty
example. What the program does is to read the value of single-cell "Named
Range" from within an Excel file, and print it out. Pls be warned that it
does no error checking whatsoever. The syntax expected is:
$ ./compile ReadRange.java
$ ./run ReadRange MySheet.xls Location
The Java file: http://www.nabble.com/file/p25042073/ReadRange.java
ReadRange.java
The compile script: http://www.nabble.com/file/p25042073/compile compile
The run script: http://www.nabble.com/file/p25042073/run run
This has been tested on POI 3.5 running on Jaunty with Java 1.6 from Sun
(Java-6-Sun).
s1b
David Fisher wrote:
>
> Nightly builds are here:
>
> http://encore.torchbox.com/poi-svn-build/
>
>
--
View this message in context: http://www.nabble.com/Woes-trying-to-compile-a-.java-file-with-POI-tp25029537p25042073.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Woes trying to compile a .java file with POI
Posted by David Fisher <df...@jmlafferty.com>.
Nightly builds are here:
http://encore.torchbox.com/poi-svn-build/
On Aug 18, 2009, at 6:36 PM, Sierra Bravo wrote:
>
> Thanks Dave.
>
> Unfortunately though, there doesn't seem to be any download links
> for the
> OOXML link. Does this have to be downloaded from svn somewhere?
>
> TIA
>
> s1b
>
>
> David Fisher wrote:
>>
>> Please see the component map on the main poi page: http://poi.apache.org/
>>
>> Notice that for XSSF you ought to be using a 3.5beta.
>>
>> Notice that additional jars are needed.
>>
>> Here is the component map:
>> POIFS poi-version-yyyymmdd.jar poi
>> HPSF poi-version-yyyymmdd.jar poi
>> HSSF poi-version-yyyymmdd.jar poi
>> XSSF poi-ooxml-version-yyyymmdd.jar poi-ooxml since 3.5-beta4
>> HLSF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
>> HWPF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
>> HDGF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
>> HPBF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
>> HSMF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
>>
>> So you'll also need "poi-ooxml" and you might need "poi-scratchpad"
>>
>> Regards,
>> Dave
>>
>> On Aug 18, 2009, at 10:21 AM, Sierra Bravo wrote:
>>
>>>
>>> Dear all
>>> I've been trying to get a .java file compiled with POI. Running Java
>>> 1.6 on
>>> Jaunty, I've tried various combinations of the following (with all
>>> the three
>>> jar files, both using the command line switch and the CLASSPATH
>>> environment
>>> variable):
>>>
>>> $ javac -classpath /home/s1b/xls/poi-3.2-FINAL-20081019.jar
>>> ReadXls.java
>>>
>>> ReadXls.java:1: package org.apache.poi.xssf.usermodel does not exist
>>> import org.apache.poi.xssf.usermodel.*;
>>> ^
>>> ReadXls.java:2: package org.apache.poi.ss.usermodel does not exist
>>> import org.apache.poi.ss.usermodel.*;
>>> ^
>>> ReadXls.java:3: package org.apache.poi.ss.util does not exist
>>> import org.apache.poi.ss.util.CellRangeAddress;
>>> (And 13 more of not being able to locate the class files)
>>>
>>> Thanks in advance...
>>>
>>> s1b
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Woes-trying-to-compile-a-.java-file-with-POI-tp25029537p25029537.html
>>> Sent from the POI - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>>> For additional commands, e-mail: user-help@poi.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Woes-trying-to-compile-a-.java-file-with-POI-tp25029537p25036243.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Woes trying to compile a .java file with POI
Posted by Sierra Bravo <si...@gmail.com>.
Thanks Dave.
Unfortunately though, there doesn't seem to be any download links for the
OOXML link. Does this have to be downloaded from svn somewhere?
TIA
s1b
David Fisher wrote:
>
> Please see the component map on the main poi page: http://poi.apache.org/
>
> Notice that for XSSF you ought to be using a 3.5beta.
>
> Notice that additional jars are needed.
>
> Here is the component map:
> POIFS poi-version-yyyymmdd.jar poi
> HPSF poi-version-yyyymmdd.jar poi
> HSSF poi-version-yyyymmdd.jar poi
> XSSF poi-ooxml-version-yyyymmdd.jar poi-ooxml since 3.5-beta4
> HLSF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
> HWPF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
> HDGF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
> HPBF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
> HSMF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
>
> So you'll also need "poi-ooxml" and you might need "poi-scratchpad"
>
> Regards,
> Dave
>
> On Aug 18, 2009, at 10:21 AM, Sierra Bravo wrote:
>
>>
>> Dear all
>> I've been trying to get a .java file compiled with POI. Running Java
>> 1.6 on
>> Jaunty, I've tried various combinations of the following (with all
>> the three
>> jar files, both using the command line switch and the CLASSPATH
>> environment
>> variable):
>>
>> $ javac -classpath /home/s1b/xls/poi-3.2-FINAL-20081019.jar
>> ReadXls.java
>>
>> ReadXls.java:1: package org.apache.poi.xssf.usermodel does not exist
>> import org.apache.poi.xssf.usermodel.*;
>> ^
>> ReadXls.java:2: package org.apache.poi.ss.usermodel does not exist
>> import org.apache.poi.ss.usermodel.*;
>> ^
>> ReadXls.java:3: package org.apache.poi.ss.util does not exist
>> import org.apache.poi.ss.util.CellRangeAddress;
>> (And 13 more of not being able to locate the class files)
>>
>> Thanks in advance...
>>
>> s1b
>> --
>> View this message in context:
>> http://www.nabble.com/Woes-trying-to-compile-a-.java-file-with-POI-tp25029537p25029537.html
>> Sent from the POI - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Woes-trying-to-compile-a-.java-file-with-POI-tp25029537p25036243.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Woes trying to compile a .java file with POI
Posted by David Fisher <df...@jmlafferty.com>.
Please see the component map on the main poi page: http://poi.apache.org/
Notice that for XSSF you ought to be using a 3.5beta.
Notice that additional jars are needed.
Here is the component map:
POIFS poi-version-yyyymmdd.jar poi
HPSF poi-version-yyyymmdd.jar poi
HSSF poi-version-yyyymmdd.jar poi
XSSF poi-ooxml-version-yyyymmdd.jar poi-ooxml since 3.5-beta4
HLSF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
HWPF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
HDGF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
HPBF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
HSMF poi-scratchpad-version-yyyymmdd.jar poi-scratchpad
So you'll also need "poi-ooxml" and you might need "poi-scratchpad"
Regards,
Dave
On Aug 18, 2009, at 10:21 AM, Sierra Bravo wrote:
>
> Dear all
> I've been trying to get a .java file compiled with POI. Running Java
> 1.6 on
> Jaunty, I've tried various combinations of the following (with all
> the three
> jar files, both using the command line switch and the CLASSPATH
> environment
> variable):
>
> $ javac -classpath /home/s1b/xls/poi-3.2-FINAL-20081019.jar
> ReadXls.java
>
> ReadXls.java:1: package org.apache.poi.xssf.usermodel does not exist
> import org.apache.poi.xssf.usermodel.*;
> ^
> ReadXls.java:2: package org.apache.poi.ss.usermodel does not exist
> import org.apache.poi.ss.usermodel.*;
> ^
> ReadXls.java:3: package org.apache.poi.ss.util does not exist
> import org.apache.poi.ss.util.CellRangeAddress;
> (And 13 more of not being able to locate the class files)
>
> Thanks in advance...
>
> s1b
> --
> View this message in context: http://www.nabble.com/Woes-trying-to-compile-a-.java-file-with-POI-tp25029537p25029537.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org