Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using Apache POI with Android

I have a tried and tested code to get information from an Excel file. It works wonders in java. However, when I try to use it in Android, I get this:

11-30 13:26:24.339: I/dalvikvm(9762): Could not find method org.apache.commons.codec.digest.DigestUtils.md5, referenced from method org.apache.poi.hssf.usermodel.HSSFWorkbook.addPicture

So, when I try to read a row, it always returns null.

How can I fix this problem?

like image 937
Charlie-Blake Avatar asked Feb 26 '26 02:02

Charlie-Blake


1 Answers

Promoting a comment to an answer... Apache POI has a small number of dependencies, which are fully listed on the Components page on the website. You need to include the dependencies of whichever POI modules you're using. In your case, the exception you got indicated that the Commons Codec library was missing, adding that solves the issue.

like image 184
Gagravarr Avatar answered Feb 27 '26 15:02

Gagravarr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!