Parsing Data from CSV

Hi there,

I am trying to parse data from a CSV file from an FTP server and am struggling with the existing posts.

testfile$ = “/TEST/TESTCSV.CSV”
GETFTPip$ = “192.168.1.2”
GETFTPuser$ = “Demo”
GETFTPpasswd$ = “demo”
GETFTPport$ = “21”
getserveraddress$ = GETFTPuser$ + “:” + GETFTPpasswd$ + “@” + GETFTPip$ + “:” + GETFTPport$ + “,1”

GETftp testfile$, “testcsv.csv”, getserveraddress$

OPEN “file:/usr/testcsv.csv” FOR TEXT INPUT AS 1

// pulling the header line and ignoring it

a$ = GET 2

To try and test if I have successfully obtained the file I tried to open it and read the first line of data however I get this error.

IO Error (33) 15 : OPEN “file:/usr/testcsv.csv” FOR TEXT INPUT AS 1

On the FTP server side it seems to have been successful.

I am looking to parse data into tags. Please help, and explain suggested lines of code as much a possible as I am new to BASIC. Thanks!

Hi @d2_mayo,

I know it’s been a while since you posted this and I’m sorry we missed it. Have you made any progress or are you still having problems?

I would recommend taking a look at these posts if you haven’t yet:

https://techforum.ewon.biz/thread-1595.html

https://techforum.ewon.biz/thread-418.html