How to read Apple Numbers File

Hi - I want to take the data from an Apple Numbers “spreadsheet” and build a SQLite database table with it. Is there any Xojo documentation on how to go about this? I’ve done searches here in the forum and on Google, but so far haven’t come up with any documentation or examples of how to do it.

Thanks, Jim

Export it as a csv file and then import it via the command line or use a GUI tool to do so

http://www.sqlitetutorial.net/sqlite-import-csv/

Or is this a task that you are going to want to automate?

Numbers format is a zip file with a lot of small files containing binary data.
The format is not documented.

So better go with text files, CSV or Excel format.

And, what about AppleScript ?
(not checked).

No, it is a one time deal. I’ve been manually adding records to this spreadsheet file after checking to be sure my new record is not a duplicate. Getting time consuming doing it manually, so I want to build a small program that checks for a duplicate and if not, adds the new record.

I’ll export the spreadsheet as a CSV and give that a shot.

Thanks!

Last time I asked, the answer was… that sqlite feature is not built in the Xojo SQLite plug-in.

Was it changed ?

Are-you using Numbers as a Data Base ?

I suppose you could look at it that way. I am keeping a “database” of eBay userids of my customers to whom I’ve charged shipping fees. The first time I charge a customer a shipping fee I include a note with his/her purchase explaining the fee structure. I only want to send that note with the purchased item once. The next time that person buys an item from me I won’t include that note if he/she is in the database.

Why do not really use SQLite to do that ? Directly included in Xojo.

Need help ?

If you need to read/write Excel files (xls or xlsx), I have a MBS Xojo XL Plugin.

Emile & Christian - I only need to read the Apple Numbers file (not Excel) once - just to build my initial database. But it appears MUCH easier to produce a CSV file from Numbers and input that into my program. After the database is built, then, using SQLite, I will add records as needed. This will be a piece of cake. I think. :slight_smile:

Thanks for the replies!

For a one time import you could even copy from numbers and then paste into a text area and then process the text. That would save you having to write any file handling code. Once it’s done, you could delete the text area from your project.

my TADPOLE app can handle all the work for you…

www.rdS.com/tadpole