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

Carl Silva
  • 61
  • 1
  • 3

7 Answers7

2

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

Sourceforge

and write routines from

What is a simple and reliable C library for working with Excel files?

Community
  • 1
  • 1
lakshmanaraj
  • 4,145
  • 23
  • 12
1

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
  • 50,202
  • 14
  • 95
  • 141
1

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
  • 390,455
  • 97
  • 512
  • 589
0

Check out XLSX I/O at https://sourceforge.net/projects/xlsxio/ It is a cross platform C library to read from and write to Excel .xslx files. Works on Windows, OS X, Linux and does not require Excel or Office to be installed. It is intended for sequential access to data in .xlsx files, so if it's only the values you are interested in this is what you need.

Brecht Sanders
  • 6,215
  • 1
  • 16
  • 40
0

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.

Community
  • 1
  • 1
Paul Dixon
  • 295,876
  • 54
  • 310
  • 348
  • 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! =] – Sniggerfardimungus Feb 25 '09 at 00:36
  • You sir, are a crazy person :) – Paul Dixon Feb 25 '09 at 01:15
0

Grab the xls reading code from Open Office.

0

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
  • 4,467
  • 6
  • 34
  • 48