I'm fairly inexperienced with arrays, but I have a CSV file and I want to grab a specific piece of data from it. For example, I understand how to iterate through the data from the 2nd column, but how do I grab the data 3 rows down in that column? How can I modify this to achieve it? I can't find anything on Google, so I'm wondering if I'm asking the wrong question...
dim fs,objTextFile
set fs=CreateObject("Scripting.FileSystemObject")
dim arrStr
set objTextFile = fs.OpenTextFile("C:\CSVfile.csv")
Do while NOT objTextFile.AtEndOfStream
arrStr = split(objTextFile.ReadLine,",")
'strUser = arrStr(0)
strFullName = arrStr(1)
'wscript.echo strUser
wscript.echo strFullName
Loop
objTextFile.Close
set objTextFile = Nothing
set fs = Nothing
For example, if my csv looked like this:
userID, fullname, address
a1, Tom Green, 123 Apple St
a2, Chad Mendez, 456 Book Ave
a3, Ville Valo, 789 Cat Way
How would I grab the data "Chad Mendez"?
TIA!