2

Im developing an android App I want to read the data in from Excel File Anyone having Idea How to read Excel file in android. I keep my file in res/raw folder and try to read it as given in this tutorial http://www.vogella.de/articles/JavaExcel/article.html Its not working if anyone having Idea then Reply Please

Thank you

Abhishek

Abhishek Karande
  • 377
  • 3
  • 10
  • 19

3 Answers3

6

Try using Apache POI

Also, see this related question

Community
  • 1
  • 1
Carson Reinke
  • 713
  • 5
  • 16
  • 2
    There are so many related questions about how to read excel file in android but no proper answer – Abhishek Karande Dec 09 '11 at 14:22
  • Using Apache POI in android the eclipse fails to generate apk.And gives error : conversion to dalvik format failed with error 2. Too many methods: 66024; max is 65536. Abhishek can you tell how did you to read excel(.xlsx) file. – Ashwin N Bhanushali Nov 30 '13 at 16:20
1

You could try out jexcelapi (http://jexcelapi.sourceforge.net/) or apache poi (http://poi.apache.org/).

0

Keep the file in the SDcard and give the path of the SDCArd while reading the file

File sdCard = Environment.getExternalStorageDirectory();
File dir = new File(sdCard.getAbsolutePath() + "/Excel/filename.xls");

For eg. if you are keeping the file in excel folder then give the path as above

j0k
  • 22,600
  • 28
  • 79
  • 90
Bhushan Shirsath
  • 258
  • 3
  • 12