Problem fetching data from a CSV


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Javier Ventura Ramos on 13th September 2016
I want to bring a CSV data from the first column
  for ( var i = 3; i < numrows ; i + = 2 ) {
                  SumaA.push ( csv.getRow ( i , 0 ) ) ;
             }
but does not collect the data correctly. However, if I take the data from the second or third column if it works.

Thank you.
Posted by Richard on 13th September 2016
Hi there,

You could use the getCol() function instead:

var SumaA = csv.getCol(0);



Richard
Posted by Javier Ventura Ramos on 13th September 2016
No, because I have to catch only the value of the even rows of the CSV file , so I can not use getCol .
Posted by Richard on 13th September 2016
Hi there,

Sure you can - just remove the even values of the resulting array. eg Using the JavaScript .filter() function.



Richard

Add a reply

 




« Back to message list
RGraph on social media