473,396 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
1 3147
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

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

Similar topics

9
by: John F Dutcher | last post by:
I use code like the following to retrieve fields from a form: recd = recd.append(string.ljust(form.getfirst("lname",' '),15)) recd.append(string.ljust(form.getfirst("fname",' '),15)) etc.,...
4
by: Charles Russell | last post by:
I am trying to have a fixed top and side sections with scrolling content. Both side sections have navigation links. The side provides external navigation and the top provides internal navigation....
28
by: Gabriel | last post by:
greetings, I want to achieve the following effect : Menu1 | Menu2 | Menu3 | Menu4 | Menu5 | I played with padding, border-width and the like and it's ok for the | . My problem is that...
5
by: Johnny Meredith | last post by:
I have seven huge fixed width text file that I need to import to Access. They contain headers, subtotals, etc. that are not needed. There is also some corrupt data that we know about and can...
10
by: Segfahlt | last post by:
I have a fairly simple C# program that just needs to open up a fixed width file, convert each record to tab delimited and append a field to the end of it. The input files are between 300M and...
4
by: John | last post by:
I can create text file, but how can I create a text file where the values are at the same location on every line? I want to define the location where the values starts and define the length of...
2
by: spacix | last post by:
Does anyone know a work around for "table-layout: fixed;" to prevent the automatic evenly space cells width without assigning classes or ID to cells? My program prints a HTML "report" file and I...
4
by: Jeff | last post by:
Hey I'm wondering how the Fixed-Width Text Format is What I know is that the top line in this text format will contain column names. and each row beneath the top line represent for example a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.