Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help with file handling

Status
Not open for further replies.

vibhava

Programmer
Apr 20, 2008
19
US
hi,
I have been trying this for some time with no results at all. I need to write a program that opens and reads a .csv file and then copies 1 column (out of many columns) at a new file (which can be .csv or any other format accessible through excel). The problem is the first row of the .csv file has headings for each column and that why i cannot use it directly as an array. here is an example of what it looks like;
Date YYYYDOY Hr Stage(m) Depth(m) Vel(m/s) Flow(m3/s) FlowOut(fraction) FlowOut(m3/s) TSSOut(ppm) SolNO3Out(ppm)
1/1/2002 2002001 0 0.01 1.09 0 0 1 0 5 0.76
1/1/2002 12:00 2002001 12 0.00802 1.08802 0 0 1 0 5.00963 0.75965
1/2/2002 12:00 2002002 12 0.00409 1.08409 0 0 1 0 5.02887 0.75895

I wish to read third column from the end.

can anyone please help me in this problem.

vibhava
 
Hi,
It is not clear because of wrap(?) whether the date and time are always present on every line, or whether the time is at the end or the beginning of a line.
Please would you clarify.
 
i got the solution to this problem (through other members on this forum).thanks

vibhava
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top