Solved

What is the easiest way to read values out of a excel file in C?

Posted on 2004-04-19
8
213 Views
Last Modified: 2010-04-15
Hi,

I have an array of float values in Excel. What is the easiest way to read these values in C? I could also save it as a comma delimited text-file... what do you suggest?


thanks
0
Comment
Question by:Bohne
8 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 10859076
Reading of values directly from Excel file requires using of Automation. This is COM technology which is no compatible with C (only C++). So, read from text file.
0
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 10859078
Hi Bohne,

Saving the spreadsheet as a comma-delimited file is by far the easiest.  Otherwise you need to understand all of the Excel data formats, which can change between releases.

If you're coding in C++ (a different problem...) there are APIs/libraries already out there to read the spreadsheet.


Good Luck,
Kent
0
 
LVL 12

Accepted Solution

by:
stefan73 earned 125 total points
ID: 10859101
Hi Bohne,
Use CSV and check
http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_20914779.html

CSV is harmless to parse.

Cheers,
Stefan
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 45

Expert Comment

by:Kent Olsen
ID: 10859135

Back to C++ for a minute -- Both Borland and MS have had the APIs built into their C++ libraries for at least 4 years.

Kent

0
 

Author Comment

by:Bohne
ID: 10859188
... I have no C++, my proc only supports C. Is there a prebuilt function available?
0
 
LVL 2

Expert Comment

by:anupvijay
ID: 10859281
0
 
LVL 12

Expert Comment

by:stefan73
ID: 10859715
Bohne,
Parsing CSV would be a nice beginner's task for lex. Especially all the quote and newline handling...

Stefan
0
 
LVL 11

Expert Comment

by:avizit
ID: 10861993
If you just want tp read /write excel files and aren't really concerned which language you are using then i would suggest suing perl
there are many modules which are already present to handle excel files

http://search.cpan.org/search?query=excel&mode=all

/abhijit/
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question