tags:

views:

1388

answers:

6

I am trying to locate a set of source code that would allow me to open and read the contents of an Excel file on Linux from within a C program.

I dont really want to link it to OpenOffice SDK if I can find something that just does these two things.

carl

A: 

Check out the answers to What is the best C library that can access Excel files?

Possible things for you to look at:

Though I think both are write-only, which is perhaps not what you need.

Paul Dixon
Well, you can always generate random data, write it to a file, check to see if the random file and the target file are the same. If they are, you know what is in the original file, otherwise, you try again. Excel on Linux a la bogosort! =]
You sir, are a crazy person :)
Paul Dixon
+1  A: 

As far as I know there is no library that does this. The common method is always to save the file as CVS in Excel, although then markup etc. is lost.

You could try to use the Excel plugin of Gnumeric:

http://svn.gnome.org/viewvc/gnumeric/trunk/plugins/excel/

It works very well (inside gnumeric).

ypnos
+2  A: 

If following suites you, then You may take read routines from

Sourceforge

and write routines from

http://stackoverflow.com/questions/493111/what-is-the-best-c-library-that-can-access-excel-files

lakshmanaraj
+1  A: 

You can use xlhtml to convert the Excel files into HTML, and then use your favorite HTML parser to extract the cell data.

Adam Rosenfield
A: 

Grab the xls reading code from Open Office.

A: 

Hi, why don't you just use Google Docs? With Gears it has offline support and you can edit files too, just a thought - http://docs.google.com

bbeckford