Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to read data from Excel docs. (*.XLS)

tychoptychop Posts: 201Registered Users
edited May 2010 in iPhone SDK Development
I need to read data from an excel doc.
Please don't suggest converting to comma seperated files. That is not a workable solution.

I can imagine that some Leopard programs use this, but I cannot find any libraries in Obj-C of C for that matter.

Anyone?
Post edited by tychop on
· ·

Replies

  • ChrisLChrisL Posts: 580Registered Users @ @ @
    edited May 2010
    I'm not aware of any off-the-shelf libraries to do this. Depending on what information you actually care about reading, it might not be too hard to write your own parser. The Excel format is pretty well documented -- see, e.g., OpenOffice's documentation on the format (PDF link), or Microsoft's official documentation.
    · ·
  • tychoptychop Posts: 201Registered Users
    edited May 2010
    I'm currently trying to figure out if I can use xlsLib
    But with my skills limited to ObjC, not C/C++, it's hard to even figure out IF it can be used. Let alone how.

    I'm off to google for some example implementations.....
    · ·
  • Ray9sRay9s Posts: 9New Users
    edited May 2010
    If you just need to view the file, then a UIWEbView should work. If you actually need to read the data, then I'm not sure (short of converting to CSV).
    · ·
  • tychoptychop Posts: 201Registered Users
    edited May 2010
    Ray9s wrote: »
    If you just need to view the file, then a UIWEbView should work. If you actually need to read the data, then I'm not sure (short of converting to CSV).

    I can do text parsing.
    But I don't have text. I have a binary xls file & need to access certain cells containing data. Thnx anyway.
    · ·
  • ChrisLChrisL Posts: 580Registered Users @ @ @
    edited May 2010
    tychop wrote: »
    I'm currently trying to figure out if I can use xlsLib
    But with my skills limited to ObjC, not C/C++, it's hard to even figure out IF it can be used. Let alone how.

    I'm off to google for some example implementations.....
    Are you sure that library supports reading excel files? Its description makes it sound like it's only intended for generating them.

    Also, be aware that the LGPL license that the library uses presents some complications when used with iPhone development, since the SDK doesn't allow dynamic linking -- see here for more details about your obligations.
    · ·
  • tychoptychop Posts: 201Registered Users
    edited May 2010
    Thanx for that info.
    I knew it only stated writing xls files, but it was the only lead I had.

    Thought: Could it be possible to render a webpage with the xls file out of view, and read data from that?
    · ·
Sign In or Register to comment.