467,877 Members | 1,077 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

Manipulating Fixed Length/Width Text File

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.
Sep 12 '07 #1
  • viewed: 2780
Share:
1 Reply
Hi,

I develop a component that will extract information from a textfile. all you have to do is to pass several parameters such as path&filename,length and datatype of each fields. the return value is a dataset.
you can send your email add to me and i will send you the dll file...
[EMAIL REMOVED]




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.
Sep 12 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by John F Dutcher | last post: by
4 posts views Thread by Charles Russell | last post: by
28 posts views Thread by Gabriel | last post: by
5 posts views Thread by Johnny Meredith | last post: by
4 posts views Thread by John | last post: by
4 posts views Thread by Jeff | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.