Set CSV reader TAB separated values


« 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 georg on 2nd June 2014
Hi there,
i got a csv file with tab separeted values.

I tried to use the optional separator parameter like it is described at the API documentation:
Constructor(URL, callback[, seperator[, endofline]])

The debug window prompted an unown parameter and the import failed. When i change the tabs to commas everything works.

Is there any chance to get the tabs working ?

Best regards

Georg
Posted by Richard on 3rd June 2014
You can use tabs by specifying the seperator as the third argument to the constructor. Personally though, my editor uses four spaces in place of tabs - so be wary of that possibility. There's an example of using tabs here:

www.rgraph.net/tests/tsv.html





Richard
Posted by georg on 5th June 2014
Hello Richard,

thank you for your reply. After replacing some spaces by tabs your example worked with my tab separated csv file.

www.spoerl-ww13.de/demos/tsv_test.html

But if i try to pick a certain value out of the table to feed a gauge it fails:

www.spoerl-ww13.de/demos/ccr.html

After replacing the tabs with commas at the csv file the HTML page works well, but it is not working with the tap separated file.

Quite strange for me.

Georg
Posted by georg on 5th June 2014
Ok,
i found the failure:

the termination }, ' '); was missing !

regards

Georg

Add a reply

 




« Back to message list
RGraph on social media