473,322 Members | 1,345 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,322 software developers and data experts.

Read data from csv file using c++

Read data from csv file using c++
Question posted by: meiliong (Newbie) on Yesterday 10:00 AM
I would like to read a column of data in csv file on each rows and get the data to perform calculation as shown below:

"Sample Number","POD1","POD5","Time"
803,E7,03,
1803,E7,03,3.3330 us
2803,E7,03,3.3330 us
3803,E7,03,3.3330 us
4803,E7,03,3.3345 us
5803,E7,03,3.3330 us
6803,E7,03,3.3330 us
7803,E7,03,3.3330 us
8803,E7,03,3.3330 us
9803,E7,03,3.3345 us

I will need to read the values in the last column 3.3330 u and use this value to convert it to frequency. Note the 3.3330us is in second which means it reads as 3.3330micro second. I would also like to repeat it for every rows until end, how should i perform that. Please help me to come out with simple vbscript command on that.Thank you
Jul 11 '08 #1
5 5208
sicarie
4,677 Expert Mod 4TB
Read data from csv file using c++
...
trimmed
...
Please help me to come out with simple vbscript command on that.Thank you
Which is it - is this to be written in C++ or VB?
Jul 12 '08 #2
Which is it - is this to be written in C++ or VB?
Sorry it should be in C++, it's a typo error
Thanks
Jul 12 '08 #3
sicarie
4,677 Expert Mod 4TB
So it looks like you'll need to be able to:

1) open the file
2) read from the file
3) parse what is read in

Are you familiar with how to do any of those in C++?
Jul 14 '08 #4
gpraghuram
1,275 Expert 1GB
If u are starting with learning C++ then search in th net for Thinking in C++ and yu can download the e-book freely.
Start reading that.
Start wrting the code and post back here if u face any issues and we can help u

Raghu
Jul 15 '08 #5
If u are starting with learning C++ then search in th net for Thinking in C++ and yu can download the e-book freely.
Start reading that.
Start wrting the code and post back here if u face any issues and we can help u

Raghu
Thanks for everyone's input. I'm able to get it done with some references from internet

Thank you
Jul 22 '08 #6

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

Similar topics

4
by: pisscot | last post by:
Lind Apr 13, 6:32 am show options Newsgroups: comp.lang.c From: piss...@gmail.com (Lind) - Find messages by this author Date: 13 Apr 2005 06:32:15 -0700 Local: Wed,Apr 13 2005 6:32 am...
0
by: Raghu Gupta | last post by:
Hi, Actually i am facing some problem using quickbooks and presently i am not so expert in using it. I am using c# code to retrive the data from quickbooks. it doesn't matter which language we...
1
by: Magix | last post by:
Hi, I have these string data: str_data1, str_data2, str_data3, which capture some value after a routine process A. Then I would like to write (append) these 3 string values into a text file each...
14
by: Mark Broadbent | last post by:
Does anybody know what is (factual please -not just guess) the quickest method to read data from a file? I am not interested in the format of the data (i.e. blocks, bytes, string etc) just that the...
0
by: Peter | last post by:
I am having a problem reading an Excel file that is XML based. The directory I am reading contains Excel files that can be of two types. Either generic Microsoft based or XML based. I am reading...
8
by: james | last post by:
I am trying to use Filestream to read a file ( .DAT) that contains values in HEX that I want to convert to text. I know the different offset addresses for each portion of the data I am trying to...
3
by: Ray | last post by:
Hello World, I made a Windowsform that reads data from a CSV file. It works fine, but when I have read the data of a record I have to re-Debug the form to read another record. So when I put a...
0
by: lovecarole | last post by:
hi, i am the student who should write a program about reading wav file and do the DFT. actually i don't know how to read data of the wav song and save it into the array... if i want to read...
5
by: dm3281 | last post by:
Hello, I have a text report from a mainframe that I need to parse. The report has about a 2580 byte header that contains binary information (garbage for the most part); although there are a...
1
by: Sachin Garg | last post by:
I have a program which opens a fstream in binary input+output mode, creating the file if it doesn't exists. But writing doesn't works after reading, it must be something obvious that I am not aware...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.