473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

How to make C++ read data from .xls or .csv ?

3
Hi guys

I am doing a work about data analysis, and I need your help..
here is the situation.
A .xls file contain all data i need to analyse, and it can be saved as .csv.
all i need to do is reading every single figure from the .xls and giving that value to a parameter that I defined in my C++ programme. But sadly i cannot make C++ to read anything from .xls..

and there are millions of figures that it is impossible to input every single figure by the bloody "cin".

so help me please. thank yuo very much.
and..thank you for you kindness reading.
May 1 '07 #1
5 3762
Savage
1,764 Expert 1GB
Hi guys

I am doing a work about data analysis, and I need your help..
here is the situation.
A .xls file contain all data i need to analyse, and it can be saved as .csv.
all i need to do is reading every single figure from the .xls and giving that value to a parameter that I defined in my C++ programme. But sadly i cannot make C++ to read anything from .xls..

and there are millions of figures that it is impossible to input every single figure by the bloody "cin".

so help me please. thank yuo very much.
and..thank you for you kindness reading.
Save it as a text file and hen read it in.

Savage
May 1 '07 #2
djbm
3
Save it as a text file and hen read it in.

Savage
how to read it in?
May 2 '07 #3
Savage
1,764 Expert 1GB
how to read it in?
Use ffilepointer.(for future referance check this )

This is vital part:

1) Loop while file handle/pointer doesn't reach EOF(end of file)

2) use fgets,getline or any simmilar method to extract one line in ur string/char array

3)Use strtok() to tokenize string and get out line segments

Savage
May 2 '07 #4
djbm
3
Use ffilepointer.(for future referance check this )

This is vital part:

1) Loop while file handle/pointer doesn't reach EOF(end of file)

2) use fgets,getline or any simmilar method to extract one line in ur string/char array

3)Use strtok() to tokenize string and get out line segments

Savage
thank you very much!
May 2 '07 #5
Savage
1,764 Expert 1GB
thank you very much!
Allways a pleasure.

Savage
May 2 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Lowell Kirsh | last post by:
I have a script which I use to find all duplicates of files within a given directory and all its subdirectories. It seems like it's longer than it needs to be but I can't figure out how to shorten...
0
by: Mike MacSween | last post by:
Yes, deliberately untrue and provocative subject line. Sorry. Just that I posted earlier and nobody, apart from Tom, seemed interested. I'm not talking Jet Users & Groups, I may or may not...
24
by: Bob Alston | last post by:
Anyone know a way to make all access to a linked table, in another Access MDB, read only? I really don't want all the hassle of implementing full access security. I can't do this at the server...
9
by: PengYu.UT | last post by:
Hi, I write the content of a in file "data" (in Sun Machine). Then I read "data" in both SunOS and linux. But the result is different. Do you know how to make it binary data portable. Best...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
2
by: Robert | last post by:
I am trying to give the user dynamic search capabilities to select almost any record in the database from criteria they select. Everything seems to work except when I open the display form to...
10
by: Extremest | last post by:
I know there are ways to make this a lot faster. Any newsreader does this in seconds. I don't know how they do it and I am very new to c#. If anyone knows a faster way please let me know. All...
0
by: Ontrace | last post by:
hello, I have Problem with Client Server Application when I unplug the client network cable, the server still read the network stream what function should I use to make server detect that the...
82
by: Bill David | last post by:
SUBJECT: How to make this program more efficient? In my program, a thread will check update from server periodically and generate a stl::map for other part of this program to read data from....
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.