?
Solved

Getting error when attempting to create a workbook using Java POI API

Posted on 2014-07-30
5
Medium Priority
?
151 Views
Last Modified: 2014-08-29
I am getting an error when trying to create a workbook. I have attached the error stack from the debug screen. This is the first time I have run into this issue and I think it may have something to do with the recent upgrade to Microsoft Office 2010 and I'm now trying to read .xlsx files where before I was reading .xls files. As such, it might mean I need some different jars. If so, how do I go about adding them to the application. As always, any help is greatly appreciated.
error-stack.txt
0
Comment
Question by:awking00
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:Jack Frost
ID: 40230653
I've not used POI and someone who has may be able to give more specific help.  Also you didn't really describe your environment very much.  Windows/Mac/Linux.   How the app is launched,  cmdline/script/somethingElse.  Sorry if this is all obvious to someone who knows POI.

I think you looking for the POI-HSSF and or POI-XSSF related jar files.  You may need to verify that they are somewhere in your system.  

Once you have loaded/located the jar files there are generally two ways to specify where to find the .JAR files to the JVM.

The CLASSPATH environment variable.
The -cp/-classpath command line parameter of the java jvm.   Try java -h for parameters.

To make adjustments you may need to track down a launch script.  Or the parameters of a desktop launch widget.  The CLASSPATH could also be set by login scripts.

This article talks a bit about the CLASSPATH environment variable: http://docs.oracle.com/javase/tutorial/essential/environment/paths.html
0
 
LVL 32

Author Comment

by:awking00
ID: 40231492
Added information - The environment is Windows and the application is being launched via Eclipse.
0
 
LVL 2

Accepted Solution

by:
Jack Frost earned 2000 total points
ID: 40231991
So your using run/debug?  I've only used Eclipse as a development environment. Usually Eclipse is pretty good about including Jars that are part of a project.   You can check the settings under:

Run -> Run Configurations.  Choose the application in the list then click the Classpath tab.

Pretty much the same for debug configurations.

If your jars are not in the list you can add them manually in the User Entries.  But you may also want to check your project dependencies if you think the jars are in location that is known to the project.
0
 
LVL 32

Author Comment

by:awking00
ID: 40261369
Please bear with me as I am awaiting the installation of a new version of Java that I belileve contains the jar file(s) that I need. I work in a place that makes one go through hoops to install any new software. I will close the question when I find that the upgrade solves my problem.
0
 
LVL 32

Author Closing Comment

by:awking00
ID: 40292850
The jar files I needed were just recently made available and adding them to my class path took care of the issue.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question