Export Core Data information to Excel Sheet
I want to have an iPhone app where the user can export the data held by the开发者_如何学编程 application to an Excel spreadsheet (as well as a host of other formats).
So the idea is that each entity would be a new row in the sheet, with the attributes being different columns.
Is this possible?
Excel and similar programs can import files that are in a delimited text format such as CSV.
It is definitely possible to manipulate Core Data attributes into strings and then combine them in such a format using the strategy that you describe: instances of an entity are rows and attributes are columns.
Note: you would need a different file for each entity that you wanted to export.
Do you need to do anything with the relationships between entities?
Did you have a specific concern?
精彩评论