Yes, It is possible to read and write excel file from android app. (Excel as Database in Android) But this post only concentrates on how to read and display data of excel file in RecyclerView. Before actually starting the tutorials, I want to give you the limitations that I came across when I tried to read and display data of excel data in the android app.
- Add RecyclerView in activiy_main.xml File to Display our data from excel
We have also added Progressbar, which will be displayed to the user when the background process is running when the app is open.
- Now, We need Custom_layout for recyclerview since we will be displaying multiple text view as well as image view on the recycler view
To use custom layout for recycler view we need to create an adapter that takes care of extracting the data from the list and binds data with custom view and displayed in RecyclerView. Here is the complete code for the Adapter.java class.
Finally, we will extract the excel file data using the JExcelApi library and Save the data in ArrayList<>(), here I have created three separate ArrayList for title, descriptions, and finally image_urls.
First using async HTTP, we need to download the Excel File form the server, following piece of code is used for that in mainactivity.java
For Full Step by Step Tutorials, Subscribe My Youtube Channel and Watch it Here:
Get Full Source of Excel as Database in Android code Download Full Source Code