We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I would like to convert a csv table looking like this (without blank lines inside)
header1, header2, header3
text1,2,3
text2,0,1
text3,0,0
into 2 arrays looking like this {{2,3},{0,1},{0,0}} and this {text1, text2, text3} Could anyone help me? Thanks a lot kamca
Answers
remarks
instead of the 2D array you could use an 1D array of PVector?
anyway this {{2,3},{0,1},{0,0}} I call points
this {text1, text2, text3} I call texts
how to
you could look at loadStrings() for loading the file into originalText (see reference).
the for-loop i over the resulting String array originalText
(pseudo-code)
use split: splitResult = split ....
and then:
Best, Chrisir ;-)
How about this 1?: ;;)
Thank you very much for both answers, you got me an idea how to sort the problem in my script in even easily ;)