Read data from Excel file in Objective-C (iPhone) [closed]

I think the PHP libraries use the Office OpenXML formats…
The best library for reading/writing binary Excel files ( without running Excel itself and calling it via COM ) I’ve used is Apache POI – http://poi.apache.org/, but this is Java. You could attempt to use GCJ to get that working on the iPhone, but who knows what Apple would make of it. You could manually port the whole thing to Obj-C/ C++ I guess…

There are a few C / C++ libraries that do a limited subset, but they probably are not incredibly reliable or simple to use.

http://xlslib.sourceforge.net/index.php – LGPL

http://www.libxl.com/ – Commercial, $199, who knows if they would give you source for that to compile into your app.

http://www.codeproject.com/KB/office/ExcelFormat.aspx – C++ source, incredibly unclear licence like everything on code project. Who knows.

Another option is to attempt to extract the code from an open source excel reading competitor. Open Office – http://www.openoffice.org/ – is likely to be a complete nightmare, Gnumeric is probably a better bet. Excel code is here – http://git.gnome.org/browse/gnumeric/tree/plugins/excel – its likely to need a lot of messing about to make it work outside Gnumeric. KSpread has similar code here : http://websvn.kde.org/trunk/koffice/filters/kspread/excel/import/ , but I believe Gnumeric has a better reputation for accuracy wrt to Excel import.

Leave a Comment