FoolzRailer
New member
- Local time
- Today, 08:03
- Joined
- Apr 15, 2016
- Messages
- 25
Hello
I have a pretty basic data setup, where the end query looks like the data in the table:
However I have too export the above data to a specific .txt format where each row basically is transposed with the column header before the data and a space between before the next item is done. The txt file should look something like this:
$NODE '01'
XY 6200000;454545
Z_F 40.10
Depth 1.20
OB 0.70
POST '1.1.2'
HTYPE 'KO'
UTYPE 'Well'
LTYPE 'KO'
ENTREPRISE 'EXXX'
STATUS P
DIMENSION 1.000
STATION 0.00
PERPEND 0.00
CATCHMENT 0.0000
Q 140.00
A_KOEF 100.0
ANM ''
Owner 'Owner 2'
TEXTXY 6200000;454545
DK_TXT 6200000;454545
$NODE 02'
XY 6200000;454545
Z_F 40.10
Depth 1.20
OB 0.70
POST '1.2.4'
HTYPE 'KO'
UTYPE 'Kost'
LTYPE 'KO'
ENTREPRISE 'EXXX'
STATUS P
DIMENSION 1.000
STATION 0.00
PERPEND 0.00
CATCHMENT 0.0000
Q 140.00
A_KOEF 100.0
ANM ''
Owner 'Owner1'
TEXTXY 6200000;454545
DK_TXT 6200000;454545
I'm figuring I will have too use some VBA script do this, but I haven't much experience with it, and I'm therefore looking for some input or sample code suggestions on how to do this. Any help would be much appreciated! There might be 1000 rows that needs to be exported to the text file.
I have a pretty basic data setup, where the end query looks like the data in the table:
$NODE | XY | Z_F | Depth | OB | POST | HTYPE | UTYPE | LTYPE | ENTREPRISE | STATUS | DIMENSION | STATION | PERPEND | CATCHMENT | Q | A_KOEF | ANM | Owner | TEXTXY | DK_TXT |
'01' | 6200000;454545 | 40.10 | 1.20 | 0.70 | '1.1.2' | 'KO' | 'Well' | 'KO' | 'EXXX' | P | 1.000 | 0.00 | 0.00 | 0.0000 | 140.00 | 100.0 | '' | 'Owner 2' | 6200000;454545 | 6200000;454545 |
02' | 6200000;454545 | 40.10 | 1.20 | 0.70 | '1.2.4' | 'KO' | 'Kost' | 'KO' | 'EXXX' | P | 1.000 | 0.00 | 0.00 | 0.0000 | 140.00 | 100.0 | '' | 'Owner1' | 6200000;454545 | 6200000;454545 |
However I have too export the above data to a specific .txt format where each row basically is transposed with the column header before the data and a space between before the next item is done. The txt file should look something like this:
$NODE '01'
XY 6200000;454545
Z_F 40.10
Depth 1.20
OB 0.70
POST '1.1.2'
HTYPE 'KO'
UTYPE 'Well'
LTYPE 'KO'
ENTREPRISE 'EXXX'
STATUS P
DIMENSION 1.000
STATION 0.00
PERPEND 0.00
CATCHMENT 0.0000
Q 140.00
A_KOEF 100.0
ANM ''
Owner 'Owner 2'
TEXTXY 6200000;454545
DK_TXT 6200000;454545
$NODE 02'
XY 6200000;454545
Z_F 40.10
Depth 1.20
OB 0.70
POST '1.2.4'
HTYPE 'KO'
UTYPE 'Kost'
LTYPE 'KO'
ENTREPRISE 'EXXX'
STATUS P
DIMENSION 1.000
STATION 0.00
PERPEND 0.00
CATCHMENT 0.0000
Q 140.00
A_KOEF 100.0
ANM ''
Owner 'Owner1'
TEXTXY 6200000;454545
DK_TXT 6200000;454545
I'm figuring I will have too use some VBA script do this, but I haven't much experience with it, and I'm therefore looking for some input or sample code suggestions on how to do this. Any help would be much appreciated! There might be 1000 rows that needs to be exported to the text file.