LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parse column data

Solved!
Go to solution

Hello, sorry if this has been adressed before. What I have is a big csv file with 60,000 rows and 7 columns.

 

I wanted to do calculations of the existing file on columns 3 and 4 which I accomplished with index arrays and formulas.

What I want now is to put these 2 new "calculation" columns, back into the same csv file starting at row 1 all the way down to 60k row,and after the existing 7th column , i.e columns 8 and 9,Any ideas?

 

Thanks

0 Kudos
Message 1 of 6
(3,179 Views)

Can you post your  vi? also tell us what sort of calculations you want to perform as u said you want to put 'new calculations" back file upto 60 k row.

so i am curious what is calculation which will produce same number of data.

 

 

 

Gaurav kSmiley Happy

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 2 of 6
(3,177 Views)
Solution
Accepted by topic author WDLV

You take the original 2D array you read, transpose it, add the new data with the build array, and then transpose the result of that.Write the new 2D array back with the Write to Spreadsheet File.

 

Add columns.PNG

Message 3 of 6
(3,171 Views)

Hi, I tried your approach and it works partially because it appends the new data after eof, thereby giving me the original rows and columns (8500 rowsx7 columns in a test file I made), plus an additional 8500 rows x9, which is what I need only. Why? Sorry for my ignorance.

 

Also, I want to add one time headers on the newly created columns. What is the best way? I included the vi.

 

Thanks

0 Kudos
Message 4 of 6
(3,161 Views)

If you don't want to append the new data, don't set the 'append to file?' input to true.

 

For columns, you can use the same function to write a 1D array of strings. This would have the append set to false and when you write the data, set append to true.

Message 5 of 6
(3,151 Views)
Thank you, that worked!
0 Kudos
Message 6 of 6
(3,139 Views)