Export Core Data information to Excel Sheet - iphone

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?

Related

Multiple table import from html page

I am a beginner in using databases, I decide upon Postgres as I have learnt it is usable with Python.
I have reports that I receive in the form of html files, each file has multiple (100+) tables when parsed with Pandas data frame function, there is no unique ID common among all tables, and each table has unique columns.
Is it possible to import all tables, and merge them as a single table with ALL the columns in it, and have each report be a single entry in this new table with a PostgreSQL built-in feature, or do I have to develop a data pipeline using python and add them in manually?
I hope my question is clear enough.
Thank you.

Store .sav file into RDBMS including meta data

I want to know what is the best approach to store the data from .sav file into RDBMS database with out loosing any meta data model as well as actual response data.
Note first that you can save all the metadata in a sav file where you have deleted all the data and then reapply the metadata to a new, similar sav file using APPLY DICTIONARY.
Otherwise, you would need to create tables in the database for the various attributes. That's easy for variable labels, formats, measurement level, and missing value codes. For value labels it would take a bit more work.
One possible approach would be to use OMS to capture the output from CODEBOOK (without any statistics) as data files and then export those files to the database.

Populate Core Data structure for iPhone/iPad with Sqlite3

I have a SQLite database. Should I put the DB in a data structure with Core Data. How can I do? My problem is "z relations" between tables.
It's possible?
Core Data isn't SQL even when it employs an SQLite store. Although it is theoretically possible to convert a standard SQLite file to the schema Core Data uses, that is difficult and risky especially given that Apple doesn't document the schema and can therefore change it without warning. You really need to translate the SQL data into Core Data objects.
The best way is to write a utility app containing you Core Data model. Read in the SQL data with the standard functions and then use that data and relationships to create the appropriate managed objects and object relationships in Core Data.
Usually you have code anyway for creating managed objects, populating attributes and setting relationships. Just use that code but instead of providing the data from the UI or a feed, provide it from the data provided by SQL.
I found a solution. In the future, should I use SQLite directly, but for those who have a similar problem to mine this solution works well.
Step 1: Core Data in your table add column headed gl'ID temporary relations of the original table.
Step 2: In the data in CSV add two columns. The first column contains the value 1 and refers to P_OPT of Core Data and the second column contains the identifier of the table and retrieved P_ENT generated by reading the SQLite Core Data in the table Z_PRIMARYKEY.
Step 3: With any editor Mac transfer your data in SQLite files generated by Core Data. Remember to attach gl'ID (relations) in the temporary columns.
Step 4: Through the use of the SQL UPDATE command (works with any SQL editor on the Mac) updates all ID columns of relations in Core Data with the value Z_PK. The value retrieved by the queries and the use of temporary columns.
Sorry for the bad English. I hope not to have been convoluted with the explanation and useful to others.

Import data from Excel File to Core Data

I have thousands of students records in Excel sheet. Now I will import that all data into Coradata [from Excel sheet to Coredata] and I will create my iPhone application using that coredata.
I don't have any idea, how to import Excel file data into coredata.
You're thinking to broadly. You need to decompose this problem further. Here's your real problem:
How do I read an Excel file into memory?
How do I create Core Data objects?
"Excel" has nothing to do with "Core Data". They are entirely disjoint topics.
For the first question, there are several options. You could try and find a library that reads .xls or .xlsx files directly, or you could require that the file be in a different format (like CSV or something).
For the second question, that's easily answered by reading the Core Data documentation.
I would convert the file to xml.
There are plenty of codes showing how to parse xml.

Regarding Excel object

i am using ADO.Net oledb for inserting and fetching data from Excel database. I want to make first column in the excel sheet to bold and i want to add comments. I am achieving this thru Interop.Excel Application class.
i dont want to use interop. is there anyway to achieve through ADO.net query itself ? or some other way? My application is c# windows application
No way through ADO.NET, any more than there is of making a SQL Server column bold. ADO.NET treats Excel as a data source - formatting is something quite different and requires knowledge of the Excel spreadsheet format, such as you'd get via Interop. There are probably other libraries you can use if you search...