I want to import a text file (fixed column length) with lines of multiple formats.
This file has one header line that has the number of records of each format.
e.g
Header line: 10 11 12
This header line says to us that follow 10 lines of format A, 11 lines of format B and 12 lines of format C
Follows 10 lines (2-11) have the format A
Follows 11 lines (12-22) have the format B
Follows 12 lines (23-32) have the format C
Is there any sample code that imports such a file?
I already though of an algorithm that does this but I thought that someone else might already has programmed something like this.
Algorithm
---------
Read the first line and retrieve the number of records of each format
Read the next 10 lines (2-11) and put them in a file A.txt
Read the next 11 lines (12-22) and put them in a file B.txt
Read the next 12 lines (23-32) and put them in a file C.txt
Use Microsoft Access to import the 3 files in seperate tables based on different import specification
This file has one header line that has the number of records of each format.
e.g
Header line: 10 11 12
This header line says to us that follow 10 lines of format A, 11 lines of format B and 12 lines of format C
Follows 10 lines (2-11) have the format A
Follows 11 lines (12-22) have the format B
Follows 12 lines (23-32) have the format C
Is there any sample code that imports such a file?
I already though of an algorithm that does this but I thought that someone else might already has programmed something like this.
Algorithm
---------
Read the first line and retrieve the number of records of each format
Read the next 10 lines (2-11) and put them in a file A.txt
Read the next 11 lines (12-22) and put them in a file B.txt
Read the next 12 lines (23-32) and put them in a file C.txt
Use Microsoft Access to import the 3 files in seperate tables based on different import specification