In a nutshell need to read in data , line by line, from a CSV file, manipulate some of the data, which has different data types (characters, integers), and then write the file to disk.
What I have done is use the SPLIT function which reads the data in fine BUT converts all the data to a String type which causes a problem as not all the data is meant to be a string type.
For example this line causes an error:
If Fieldsval(575 + d) = 1 And Fieldsval(585 + d) = 1 Then Fieldsval(855 + d) = Fieldsval(855 + d) + 1
This throws a compiler error: 1 dimensional array of string cannot be converted to 1 dimensional array of variant type because string isn't derived from a variant type.
Tried converting the data from a string to a variantType array but the compiler throws an error that the string can't be converted to a variant because its not derived from a variant Type
Is it possible to easily read a CSV file that has different data types on the same line into a variant or other type array ?
I'm very new to programming in general and vb.net specifically
Any help or suggestions are appreciated
What I have done is use the SPLIT function which reads the data in fine BUT converts all the data to a String type which causes a problem as not all the data is meant to be a string type.
For example this line causes an error:
If Fieldsval(575 + d) = 1 And Fieldsval(585 + d) = 1 Then Fieldsval(855 + d) = Fieldsval(855 + d) + 1
This throws a compiler error: 1 dimensional array of string cannot be converted to 1 dimensional array of variant type because string isn't derived from a variant type.
Tried converting the data from a string to a variantType array but the compiler throws an error that the string can't be converted to a variant because its not derived from a variant Type
Is it possible to easily read a CSV file that has different data types on the same line into a variant or other type array ?
I'm very new to programming in general and vb.net specifically
Any help or suggestions are appreciated