CSV Reader Errant Data

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« 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 Michael on 15th January 2014
Working with the CSV functionality to pull the data on my chart and wondering if there is a way to cause the csv getcol() function to ignore a couple of lines before pulling the data? My client will be updating the data sets occasionally, and isn't comfortable working without header rows. It's a csv with about 20 columns. so it can get confusing for them.

Michaal
Posted by Richard on 15th January 2014
Hi there,

You can loop through the data starting the numbering at 1 instead of at 0.

for (var i=1; i<numrows; ++i) {
     alert(csv.getRow(i));
}



Richard
www.rgraph.net
Please link to the RGraph website. Thanks!

Add a reply




« Back to message list