Hi,
I would like to seek some advise and assistance regarding the following matter as I am new to VB.Net. I'll appreciate any helps render.
I am developing a VB application using VB.Net 2003 to extract data from text files and import it into datatable. The format of the text file is fixed length/width. Eg.
I am having trouble to do so as I am not sure how to start. I had done some research and notice that TextFieldParser can be use (I can switch to VB.Net 2005). However, this may not applicable as we need to define the length or width first which is not ideal for my case. The application should be able to read and calculate the length or width for any text files (not just limited to the above fixed length/width format, can be any format of fixed length/width), extract and put them in datatable.
I had used another method - using OleDbDataAdapter to extract the text files with the defined schema.ini. This approach also is not ideal as we need to define the format in schema.ini. If possible, I would like to make it all to be automatically - without defining the table format.
Any advise? Thanks!
PS: If possible, please also provide some code snippet as I am new in this area.