06-04-2009 09:32 PM
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
Solved! Go to Solution.
06-04-2009 09:52 PM
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 k
06-04-2009 10:22 PM
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.
06-04-2009 11:12 PM
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
06-05-2009 07:10 AM
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.
06-05-2009 11:11 AM