How to Read Excel File

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2009
Posts: 15
Reputation: everard is an unknown quantity at this point 
Solved Threads: 0
everard everard is offline Offline
Newbie Poster

How to Read Excel File

 
0
  #1
Mar 11th, 2009
I'm creating a program in Visual C++ and the program I'm creating needs to read a data in an Excel document. It was saved in .xls format.

Can someone help me on how to read data in an Excel file. No need for writing or editing the excel document, just a read function. I found lots of codes on how to manipulate an excel file but it seems too complicated for me since I'm just a noob in C++. Maybe a very simple sample code on how to read from an Excel file.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 670
Reputation: Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough 
Solved Threads: 113
Freaky_Chris's Avatar
Freaky_Chris Freaky_Chris is offline Offline
Practically a Master Poster

Re: How to Read Excel File

 
0
  #2
Mar 11th, 2009
It's not as easy as it sounds, since there is alot of information in an xls file, ofcourse there are different versions too. http://sc.openoffice.org/excelfileformat.pdf

Normally when you are a beginner looking at something like this, you would use CSV files, as they are much easier to read etc. Please note, we will not provide code solutions for you, you will need to do some work yourself and show evidence of the fact you have done so.

Chris
Last edited by Freaky_Chris; Mar 11th, 2009 at 6:22 am.
Knowledge is power -- But experience is everything
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 15
Reputation: everard is an unknown quantity at this point 
Solved Threads: 0
everard everard is offline Offline
Newbie Poster

Re: How to Read Excel File

 
0
  #3
Mar 11th, 2009
Can you show me a very simple example on how to read an excel file saved on a CSV format.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 670
Reputation: Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough 
Solved Threads: 113
Freaky_Chris's Avatar
Freaky_Chris Freaky_Chris is offline Offline
Practically a Master Poster

Re: How to Read Excel File

 
0
  #4
Mar 11th, 2009
Originally Posted by Freaky_Chris View Post
Please note, we will not provide code solutions for you, you will need to do some work yourself and show evidence of the fact you have done so.
It's really not to hard, if you know some basic file handling techniques you can do it no problem.
It can get a bit more advanced but to start with it's simple enough, and I'm sure if you do some research; it would be even easier.

Chris
Knowledge is power -- But experience is everything
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 3
Reputation: dmytro is an unknown quantity at this point 
Solved Threads: 0
dmytro dmytro is offline Offline
Newbie Poster

Re: How to Read Excel File

 
0
  #5
Apr 10th, 2009
You can try 3rd party commercial library for this task, for example: http://www.libxl.com. It has an easy interface.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: How to Read Excel File

 
0
  #6
Apr 10th, 2009
If you want to write to Excel files you can use xlsLib
However I would recommend to use CSV-files (as already mentioned) because they're more C++ friendly and it's just easier to read out the data using some simple file handling techniques ...
Last edited by tux4life; Apr 10th, 2009 at 9:03 am.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC