Try the search, it's linked to some great forums

Sunday, August 5, 2012

Creates a plist from an Excel spreadsheet

Here's a quick & easy way to get data sets to use in iPhone apps. We take any simple spreadsheet with the first row as the titles or keys, and convert it to a simple plist.
  1. Save your spreadsheet as a .CSV file 
  2. Get a copy of this great little executable, PList Converter, and 'drag N drop' your .csv file into it
  3. Out pops a nicely formatted .plist file that you can drop into your Xcode project.
  4. Open the file in TextEdit and note the format of the XML file.  In this case it is an ARRAY of DICTIONARIES.  This is important for subsequent operations in Xcode
To import this file into an actual project.  Drop the file into the project like normal & then use the following MainBundle commands;
    NSBundle *mainBundle = [NSBundle mainBundle];
    NSURL *countriesArrayURL = [mainBundle URLForResource:@"WorldTestData"       withExtension:@"plist"];
    self.countriesArray = [NSArray arrayWithContentsOfURL:countriesArrayURL];

Many thanks to Danilo Campos for the binary!