Java Excel API problem

Put your problem here if it does not fit any of the other categories.

Java Excel API problem

Postby mike075 » Wed Nov 10, 2010 9:01 pm

Hello,

I want to use the JExcel API to read contents of an excel file.

I have done till now the following things:
1. followed all the steps at http://www.andykhan.com/jexcelapi/tutorial.html
2. and at http://retrotranslator.sourceforge.net/#android
3. In Eclipse at Project -> Properties -> Java Build Path -> Add Library -> User Library -> excel [system library]
i added the required library.

When i run the app in debug mode the programm shows in debug trace window the following error:
InvocationTargetException.<init>(Throwable) line: 56

and in LogCat displays the following:
11-10 21:32:17.192: ERROR/dalvikvm(1194): Could not find method jxl.Workbook.getWorkbook, referenced from method my.android.CustomFile.readFromExcelFile

Code: Select all
...
String sFile = Environment.getExternalStorageDirectory()+"/"+this.sCustFile;   
Workbook workbook = Workbook.getWorkbook(new File(sFile ));
...


Can someone help me because i am trying a few days without success.

THX for helps

Mike
mike075
Freshman
Freshman
 
Posts: 7
Joined: Tue Jul 06, 2010 11:43 pm

Top

Re: Java Excel API problem

Postby mike075 » Thu Nov 11, 2010 5:14 pm

Is there nobody who knows about this problem?

Today i have done following:
1. created a folder lib in my project dir
2. copied the jxl.jar into this dir
3. added this file with right klick on the jxl.jar (after refresh) -> build path -> add to build path
4. cleaned the project contents

After that i got the error:
Conversion to Dalvik format failed with error 2 Voc-Trainer Unknown Android Packaging Problem

I had this problem at my first experiences few days ago but i couldn't fix it.

Can someone post me his tutorial how i can get the java excel api working pls?

Thank you for anyone who can help me.

greetings

Mike
mike075
Freshman
Freshman
 
Posts: 7
Joined: Tue Jul 06, 2010 11:43 pm

Re: Java Excel API problem

Postby jonbonazza » Thu Nov 11, 2010 9:27 pm

If it is a Java api and not android specific, then perhaps it is simply not supported by android.

Not all APIs developed for java will work with android.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: Java Excel API problem

Postby mike075 » Thu Nov 11, 2010 9:51 pm

Thanks for your help

I have read a lot of posts where people use this lib with eclipse to read and write excel files
for android development, but i have only problems with this lib thats a little bit strange because i
followed all the steps in the tutorials.

Is there any other excel api for android development which works without compatibility problems?
Or is there any other solution for reading excel files with the android sdk?

Thanks for helps

Mike
mike075
Freshman
Freshman
 
Posts: 7
Joined: Tue Jul 06, 2010 11:43 pm

Re: Java Excel API problem

Postby jonbonazza » Thu Nov 11, 2010 10:04 pm

I am honestly not sure about alternatives.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: Java Excel API problem

Postby mike075 » Thu Nov 11, 2010 10:21 pm

Is there any other format like xls which manages tables and has libs who are supported?
Or with other words a format which is similar to excel.
mike075
Freshman
Freshman
 
Posts: 7
Joined: Tue Jul 06, 2010 11:43 pm

Top

Re: Java Excel API problem

Postby mike075 » Fri Nov 12, 2010 5:00 pm

Hello,

i have found an alternative methode to read from an xls doc.

The alternative is the csv format which works like reading a txt file.
Yoy only have to write functions that split the string into peaces.
mike075
Freshman
Freshman
 
Posts: 7
Joined: Tue Jul 06, 2010 11:43 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 9 guests