How do I get the CSV reader to parse 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

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:

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.

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

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.

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

the termination }, ' '); was missing !



Add a reply

« Back to message list