• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to use POI

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to write data into MS excel. I downloaded "poi-bin-2.5.1-final-20040804" from http://jakarta.apache.org/poi/
Than I set my Classpath to "C:\j2ee\POI" (this is where I have poi-2.5.1-final-20040804.jar, poi-contrib-2.5.1-final-20040804.jar and poi-scratchpad-2.5.1-final-20040804.jar)
When I use
import org.apache.poi.*;
HSSFWorkbook workBook = new HSSFWorkbook();

I get the following error.

BPM1.java:3: package org.apache.poi does not exist
import org.apache.poi.*;

Can anyone please help me to solve this?

Thanks in advance.

Kashyap
 
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
are you talking about writing/compiling a java application ?

you do not put direcetories on the classpath but the individual jar files. why dont you use an IDE ? perhaps you should learn the concepts of java first before trying to use POI...this was not advanced...


p
 
Kashyap Hosdurga
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pascal,
Sorry, I thought this to be advanced .
I am writing a Java program where I must write into MS excel.
I tried searching in Google for good resource but couldn't find. Can you please let me know where I can learn basics about handling MS word and excel.


-Kashyap
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, did Pascals hint help you resolve the problem? The documentation of the Excel part of POI is on the web site, while the Word handling capabilities are no longer under development.
 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the "quick how-to" in poi is pretty good. used it to learn how to manipulate excel-sheets, and it all worked out pretty smoothly, if you dont try to do tooo complex stuff.

you will not find much more documentation in the web, at least i did not find much. the fact that "poi" has a meaning in spanish or so doesn't make it easier to google for it :-)
 
Kashyap Hosdurga
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you all for the help, I am able to use POI in my Java code.
 
Yup, yup, yup. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic