Import data from .xls File - iphone

I am developing an application in which i have to get data from .xls file. I am fairly new to iPhone development so any pointers in direction to getting started will be very much helpful.
The steps that i am thinking are :
1) First i need to convert from .xls to .csv Format.
2)Import the data from .csv file to SQlite Databse or Core Data.(I am not familiar with any one of them, so kindly suggest which one to choose. I am looking forward to use Core Data)
Am I thinking in the right direction? Will be greatful for any kind of assistance..
Thanks in advance.

While I cannot speak to the first part of your question, I can give you advice for the second. Because you are importing the data as opposed to writing back to the xls format, you want to go with Core Data. There is no reason to be using sqlite directly anymore.

I think sqlite is a good idea if you want to be able to use the same datastore with multiple different devices in the feature. If you are targeting iphone only then go with core data. Also a sqlite datastore can be loaded back in with core data on top at a latter date if you want all that caching ability.

Related

Implement two way syncing with Mysql In Iphone

In my App I Want to implement two way syncing with My server. I want to work offline When I do not have internet. I have managed core data for that. But at starting of my app I want to load all my data(that contain text , images) to sqlite file.
Is it a good approach? I think It is not user friendly. After Offline work I need I want to sync the changed data with server. I achieved it with the CSV File(text in CSV file and all my images are going with NSURLSessionDataTask). But this work is so complex to handle. Can any one help me with a good solution. Every solution is welcome

Simplest way to store and populate data for a demo application

I am currently creating an application that has a user, the user can follow others, post content, amongst a few other features and am wondering what would be the most ideal way to store and create data for a demo. I started building a rails site but felt that is becoming fairly time consuming for a demo application. Does anyone have any suggestions? pLists, JSON file, XML files?
What is the nature and size of the data?
pLists are convenient for a few dozen lines since they are easily converted into a dictionary at runtime.
If you have hundreds of items, you're probably better off writing an xml file and parsing it.
Simplest way is to way the object to FILE use Keyed Archiving. If you are bored about right almost same Keyed Archiving code each time. try to use Accessorizer

Data storage format for iPad app. Export to excel

I am fairly new to Objective C and iOS programming but am constantly trying to learn as much as I can.
I am about to start an iPad project which will involve storing large amounts of data which will need to be exported to one extremely large excel spreadsheet.(it's for a friend....they currently enter massive amounts of data into excel by hand so that they can analyze it).
This database contains over 400 names(this number is constantly growing) and the app will be very functionally similar to to built in contacts app, except that for each name there will be approximately 2,000 attributes. These attributes will be entered across tens, if not over a hundred views.
The excel file will be located on a local server and the database will be synced with it over wifi. If I have to write a server side application to handle this, I happily will.
My question is this:
What data storage method would serve best for my purpose accounting for the sheer size of the database and the need to export to excel? (i.e. CoreData?, SQLLite?, XML?)
I sincerely appreciate any help you might offer.
James
It'll be harder to create a CoreData store on the server end. I'd suggest using and SQLite DB. FMDB is decent frontend for using SQLite on the iPhone, but there are many others.
A framework for relational data such as Core Data or SQlite would work well for selecting and working with subsets of data. There's no innate export-to-Excel functionality but you could export a csv (comma-separated-value) file that Excel can import.

How to write Data Base application in iPhone

Hi I am create an iPhone app, which will use SQLite as database. This database is synchronized by websever by XML HTTP request. The problem is, I don't have pre-build architecture for creating database app.
Is there any tutorial which will guild me how to write Data Access Layer(DAL) or how to import SQLite file with iPhone in secured way.
I dont want to open database connection again and again, its like creating a single class which will handle all database related part.
Please suggest me.
Thanks
You just described something that Apple calls Core Data. See this link for some more details
http://cocoadevcentral.com/articles/000086.php
It does describe Core Data on the desktop but it is essentially the same.
Core Data is a pretty light wrapper for SQLite written by apple. Core data once you have your base code in place you will find it pretty easy to work with.
The other big win with Core Data is that it has a small memory foot print which is important to make sure your application performance optimal.
I would first start with some sample code, core data is going to take a few hours to get started and few days to weeks to learn but once you are past this you should find it very handy and powerful.
John.

Does Core Data exist on the iPhone? Or how would you save Data on the iPhone?

Lets say I make an App that enables users to make short notes and write things down.
Is there Core Data on iPhone OS too?
Or how else would you save that data in iPhone?
No. Core Data, and Cocoa Bindings, as well as Objective-C Garbage Collection are all missing from the iPhone.
Update: As mentioned below, Core Data is available with iPhone OS 3.0.
If you can wait for iPhone OS 3.0, Apple's preview movie lists Core Data as one of the new features in 3.0.
SQLite is generally the preferred storage method if you have a lot of data. You can code the SQL classes by hand, or there are a number of nice third-party solutions.
For smaller amounts of information, you can easily store data in a file using NSCoding and NSArchiver.
I'll reiterate the above, but you could have a look at OmniDataObjects which provides Core Data-esque functionality and runs on the iPhone.
If you have to do some ordering or querying on the saved data, the best solution is SQLite.
Otherwise you can use serialized data. NSDictionary and NSArray provides -writeToFile methods to write serialized (in xml format) data to file.
Marco
depending upon the complexity, you can save your data on sqlite database, plist files, or even create your own xml files and save them on iphone file system (usually in the documents directory)
if you dont anticipate too many reads / writes / complex lookups then stick to plist files or xml files
however anything more complex, go ahead with sqlite.
if you do go ahead with sqlite then i would suggest you to use FMDB - a cocoa wrapper for sqlite, this saves you tons of repetitive code
Data saving on the iPhone is not much different - write the data to a file (like a plist). As far as I know, there's no iPhone Core Data.