Export data to Apple XML Property List

C

cmteng

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

Hi all,

I have an excel file with 2 columns and few hundred rows of data. I would like to export the data to Apple XML Property List. I notice there is no easy way to do so. I don't think I want to reenter the data again in Apple's Property List Editor. Anyone experience such issue? Can quick way out of this?

Regards,

cmteng
 
J

JE McGimpsey

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

Hi all,

I have an excel file with 2 columns and few hundred rows of data. I would
like to export the data to Apple XML Property List. I notice there is no easy
way to do so. I don't think I want to reenter the data again in Apple's
Property List Editor. Anyone experience such issue? Can quick way out of
this?

AFAIK, there's no easy way to do this, but you if it's a one-off, it's
fairly simple to:

1) Insert 1 column before your data and two columns between your data
columns for tags.

2) Add tags, e.g.:
A B C D E F
1 <key> key1 </key> <string> string1 </string>
2 <key> key2 </key> <integer> 2 </integer>
....

3) Save the file as text (.csv or .txt).

4) Read the file into a text editor.

5) Delete the commas (tabs)

6) Add header lines:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

(the second line unwrapped should read ...//EN" "http://... - i.e., a
single space between the quotation marks)

7) Add at the end:

</dict></plist>

8) Save again with the extension .plist.

If you do this often enough, you could probably AppleScript it.
 
C

Chou Ming

Hi J. E. McGimpsey,

A million thanks for your respond. I really appreciate that.

I thought of this way but I didn't try to do it. I guess there is really no way to export the file directly to the plist.

We need the data in plist for one of the iPhone app that we are working on. We decided to change it to tab delimited file, that is easier.

Again, thank you very much!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top