Use excel files in android application - android

I have multiple long excel files on my computer that I need to use in my android application.
The excel files contains 10 000 rows and I was wondering how I could include it in the project so I can use it in the application on the phone. I know I should use some sort of database so I can use SQLite in the android application. How can that be done? Any links to tutorials?
thank you

You can use the Java Excel library for this. First you need to parse the excel file and then store that data in your mobile database.
You can use the following URL for further clarification.
http://www.vogella.com/tutorials/JavaExcel/article.html

Related

Accessing SQLite from another device

Background:
I don't have any knowledge in Android. I want to develop an app with 2 forms, one is to take customer data and one is to search the data. I can do this app in web or in Jface/SWT but just want to check feasibility of writing it in Android.
Problem statement:
Can we create an app in Android like mentioned above with SQLLite DB? but the data should be accessible from another android device with same app. i.e. my DB will be hosted on one Android device and I should be able to access that from another device also. The architecture is shown in below image.
Can we do something like this in android?
So I have two ways to do that:
Conver your csv file to db or sqlite using SQLite Database Browser and than paste this file into your assets folder of your project and than on create of your Application or Activity write it in the Data folder/directory of your app property and so that you can get your Database on each device.
If it does not help follow this one:
https://www.b4x.com/android/forum/threads/remote-database-connector-rdc-connect-to-any-remote-db.31540/

Can We Store Our SQlite DataBase Into PDF or Excel File?

I'm fairly new to Android, I'm created simple CRUD operation app... now i want to save my data base into SD card in pdf or excel format.. can we do this .. if yes.. then how to achieve it or not.. then why?
Of course no ?
why use PDF or Excel !!!
You will not able to CRUD any more on this file ? even if we suppose you use a 3rd lib to update this file on android , but why use a file , it will be hard and even very slow compared to sqlite..
and how to deal with relation between record in your database ?
I advise you to use sqlite or any ORM in android instead of file like PDF or Excel... and you can export from database later a PDF/EXCEL/etc ...

Reflect Data in the Excel sheet to the android app

I am new to android development. I have two questions:
I have an Excel sheet as a database for my data. I want to display that data in my android application. How can I do it? Do I have to use SQLite database? If yes, then how?
If there are any changes in the Excel sheet in the future, then how would be these changes be reflected in the application?
Thanks in advance for all the help.
To read excel file in android, you should use some excel library such as JExcelApi, Apache POI.
after reading it, you can write them into SQLite dababase to reduce excel parsing time.
when you parse excel file, you save the file's last modified time to text file or preferences and whenever your app runs, comare them and update it if last modified time is different.
WelCome to Stack overflow!
I have an excel sheet as a database for my data.I want to display that data in my android
application.How can i do it? do i have to use sqlite database?if yes then how?
Here is example how read .xls file from server (you can also read file from SDCARD)
assume your .xls is like below
then you have to create sqlite database and create table with field(Item Number,Description,Price,Quantitiy) you can also create fields depend on .xls file.
after read data from .xls insert in to sqlite database
Note: with xls some times its not working well if file format is not well. i have developed app which work with xls,csv. so, i ll sagest you to use csv insted of xls which is best option. how read csv file and how write csv file.
And if there are any changes in the excel sheet in the future then how would be these changes be reflected in the application
any changes in xls then you have to update you sqlite database.(its easy if you have developed code to create table dynamically depend on xls file column then its good)
How to use sqlite in android Basic
How to use sqlite in android.

How to distribute Android app with DB data?

I'm writing my first serious Android App, which basically is interface to three DB tables.
Data in those tables are predefined by me, so, user should install those app with those data.
What is the best way to include those data in application package? Maybe there is a way to embed SQLite into my application distribution?
Or is the only way is to define array of "insert into" strings somewhere in class and execute them to fill internal SQLite storage?
Would appreciate any recommendations.
I am currently doing the same thing in my app. Having a sqlite database file in my assets folder and copying it into the SD card at startup if it's not in there. There's a nice tutorial there and I use part of its code.
Put the database file in your assets and then copy it over to your application's data directory.
Your can check out this tutorial

how to open Iphone's database(created) in Android?

Database is created in Iphone using SQLite.Now I want to use same database file in Android and insert the data into tables.How to do that?
Android Developer
The easiest way is to copy the file in your applications folder say assets folder and copy the database from the local file, first time the app is loading.
this link will give you a solution.

Categories

Resources