Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

primedime

macrumors member
Original poster
Mar 21, 2011
66
0
Ft. Lauderdale, FL
Is there a way to get data from an excel worksheet to a .plist file without having to copy and paste everything manually? If there are several ways, which is the best? Also, is there a better/easier way to implement info from an excel spreadsheet data in to the iPhone besides trying to create a .plist? Thanks!
 
Maybe write a program to do it. Or maybe not, unless you expect to be repeating this task many times.

The "best" way would be one that you can actually do. If you don't know how to write a program or script that runs on the Mac and tells Excel to export CSV then parses the CSV into plist form, then that's not really an option. So you should describe what you can do, and post that.

We have no idea what your experience is, what your other skills might be, or how many times you have to perform this conversion to plist. You could start by explaining what the data is, how it got into an Excel worksheet, and why you have to extract it from Excel. If the data originates somewhere else, you might be better off going to the original source, rather than trying to suck it all through the Excel sodastraw.
 
What you want to do is save the spreadsheet as csv and then use sed to convert to plist
 
What you want to do is save the spreadsheet as csv and then use sed to convert to plist

awk might be a better choice than sed. It's more oriented towards lines with delimited fields.

In any case, the OP would have to learn the new language and write a conversion program using it. Presumably, if he already knew a suitable language (sed or awk or perl or whatever) he wouldn't have needed to ask the question.
 
Chown, that may be correct very much depending on what the data looks like. Op should provide a few unaltered rows.

I'm suggesting sed because I'm familiar and comfortable with sed, I know awk is very powerful but I've had limited exposure to it. Many tools can do this job.

Either way, sending a kid on a wild goose chase isn't cool. These tools are difficult enough as it is without prior exposure. My suggestion was to use sed (and a few pipes) - which will likely do the job.

So op, without having to post your cv, I recon sed is what you're after. Give that an ol google. If that doesn't do the trick show us your data.
 
Thanks for the great responses... Let me tell you a bit about this data I want to use in my app...

I have an excel spreadsheet of all the all the college football coaches in the country. I have them broken up by Division (D1, D2, D3), then by University and within that there are the names, phone numbers and email addresses for all coaches at the particular program.... I want to make a simple application that just organizes this info and makes it available through a search bar and tableview.... I did an example app a few days ago with a names list of over 2000 names... It was in a .plist and I figure that might be the best way to get my database in a tableview... but could there be an option of creating an xml file for grabbing off a server or is keeping the info internal on a .plist the best way? I have this info on excel and would be willing to just copy and paste everything in to a .plist but want to see if there are more efficient options out there... thanks!
 
I was thinking that would be an option. Let me ask you, if I convert it to XML should I be storing it on my hosting space or can I import that XML file directly in to the resources folder? I basically have the app built already, it just is lacking this data right now....
 
Let me ask you, if I convert it to XML should I be storing it on my hosting space or can I import that XML file directly in to the resources folder?

Depends on the needs on your app. If it's fairly static, you can store in within your app's Resources (but realize that changes to the data would require updates to the app, i.e. new versions). Storing on your hosting space would allow you to update the data without having to update the app but then you require internet access for your app, i.e. it's not stand-alone. Another approach would be to have your app download the data from your host and store it within your app's Documents folder and then only update it from the server on an as-needed basis.
 
Another approach would be to have your app download the data from your host and store it within your app's Documents folder and then only update it from the server on an as-needed basis

This sounds wonderful, but I am sure this is the hardest of the three to implement... Can you point me in the right direction as far as documentation goes so I can start reading up on to actually implement this?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.