LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-24-2004, 06:44 AM   #1
rajesh_b
Member
 
Registered: Sep 2004
Location: Hyderabad.
Posts: 83

Rep: Reputation: 15
Reading excel files from c language


Hi,

In the part of my project i have to read excel files and parse them. But i dont know how to read excel files . Is there any special libraries needed or it can be done with normail file i/o available in c progaramming language. Any ideas regarding how can start and approach.

thankx in advance,
rajesh.
 
Old 11-24-2004, 08:43 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,500

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Excel (xls) file format is pretty proprietary, I guess you'll find in Open Office source code what you need.
A simple way would be to have Excel save its data in csv or sylk format, that are easier to parse.
 
Old 11-24-2004, 03:05 PM   #3
quarry_06
Member
 
Registered: Oct 2004
Posts: 77

Rep: Reputation: 15
Arrow

if you are using windoze, which I guess you're not , you could use COM Libraries
I haven't used these but a friend of mine has been doing this. (c++ % com)

or is there something like com for linux?

but using csv is cetainly the better alternative and a lot faster. (com is purty slow)
 
Old 11-25-2004, 03:35 AM   #4
rajesh_b
Member
 
Registered: Sep 2004
Location: Hyderabad.
Posts: 83

Original Poster
Rep: Reputation: 15
I m not using windows. I have googled but i did not find enough information on how excel file is stored. It is very important to know how the file is stored. Actually what i m doing is that "reading excel file and transform them into csv files and it is the csv file data that is inserted into the mysql database".

If any body have the idea of excel file storage tell me . It would be lot more useful to me.

thankx in advance,
rajesh
 
Old 11-25-2004, 06:26 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,500

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
If you are brave enough, read the ~200 pages describing excel file format at http://sc.openoffice.org/excelfileformat.pdf and then write you own code ...

Otherwise, why not reusing OpenOffice.org open source code, through its SDK:
http://www.openoffice.org/dev_docs/source/sdk/ ?

You can also find other XLS resources at:
http://chicago.sourceforge.net/devel/docs/excel/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database to Excel Files hategiants Linux - Software 4 07-27-2005 12:41 PM
Sharing Excel files in Linux cmdyer Linux - Newbie 4 06-30-2005 02:02 AM
changing language of new files Randy C Linux - Newbie 4 10-05-2004 04:15 PM
Reading Files clowns119 Programming 12 09-23-2003 06:06 PM
reading files MrGardenHoseMan Linux - Newbie 2 07-06-2003 05:58 PM


All times are GMT -5. The time now is 05:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration