title: Reading data from .xls/.csv files into iOS
body: <p>I'm new to iOS and am trying to read the contents of a spreadsheet into an iOS array.
  The spreadsheet that I'm using is a simple 3 x 2 array of numbers for the first column and text for the second. I've tried reading it in with &amp; without column headers, in .xls, .xlsx, . cdv, .txt (unicode and delimited) but without success. The file is called "funds", and the code I'm using is:</p>
  
  <pre><code>NSData       *databuffer;
  NSFileHandle * file;
  NSString     *docDir  = NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES)[0];
  NSString     *fileDir = [docDir stringByAppendingPathComponent:@"funds.xls"];
  
  file = [NSFileHandle fileHandleForReadingAtPath:fileDir];
  if (file == nil) NSLog (@"Failed to open file");
  
  [file seekTOOffset: 10];
  databuffer = [file readDataOfLength: 5];
  [file closeFile];
  </code></pre>
  
  <p>It finds the directory of the file but gives up at <code>[NSFileHandle fileHandleForReadingAtPath:fileDir]</code>. </p>
  
  <p>What should I be doing? I need help with confirming what file type I should use as the source, and how to read it into an array.</p>
  
  <p>When this has been solved, I'm likely to need to read in large amount of data, several columns, 4k rows, a mixture of text &amp; non-integer numbers. </p>
  
  <p>Is there a format or method I should be using when the volume of data is getting to that size?</p>