Question

Any idea how to go about formatting the data so I can export from my app data in excel format or even a simple table would be okay, how are people getting stuff out of the phone?

This particular app is about keeping track of money, so i can pretty much turn everything into nsstrings but how do I:

A. format the strings so the fields are delimited in some way that can be parsed by a program like excel or word or something like that, and

B. what is the best way to ship that data off to users, even something simple like popping open a mail message with the created file as an attachment.

Is this approach possible. Even if its not perfect I want to be able to at least say to users, "hey you can get this data out of the app."

Thanks for the help,

Nick

Was it helpful?

Solution

A. The easiest way is to generate a CSV file -- not even kidding. Excel can open it natively. If you really want a .xlsx file, though, you'll probably have to use a third party library or write your own. Maybe not as hard as it sounds.

B. It's not possible to send attachments from the iPhone. The easiest way to export anything is to upload it to a web server and have your user download it separately. Remember that the iPhone is a phone, and isn't really meant for enterprise applications.

OTHER TIPS

To generate an Excel file, you will have to write out the data in a format that Excel understands. You might want to start by taking a look at

http://en.wikipedia.org/wiki/Microsoft_Excel#File_formats

which even shows a very simple XML document for a .xls file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top