I am trying to convert a fixed length textfile to datatable.
This the vb code I am trying to use:
VB
Using MyReader As New Microsoft.VisualBasic.FileIO. TextFieldParser(“C:\ParserText.txt”) MyReader.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.FixedWidth MyReader.FieldWidths = {5, 10, 11, -1}
I am getting error when using invoke method for this code:
MyReader.FieldWidths = {5, 10, 11, -1}
Any help please.