VBA- Export Excel table Rows to a text file in a specific format

lstullwv

New Member
Joined
Sep 1, 2010
Messages
3
I am needing help in exporting a table to a text file in a specific format.

The table is in the following order:[TABLE="width: 384"]
<tbody>[TR]
[TD="width: 64"]S[/TD]
[TD="width: 64, align: right"]45[/TD]
[TD="width: 64, align: right"]2[/TD]
[TD="width: 64, align: right"]58[/TD]
[TD="width: 64"]E[/TD]
[TD="width: 64, align: right"]297.74[/TD]
[/TR]
[TR]
[TD]N[/TD]
[TD="align: right"]59[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]11[/TD]
[TD]E[/TD]
[TD="align: right"]102.1[/TD]
[/TR]
</tbody>[/TABLE]


I am looking for an output in a text file of the following format:
The range can also be variable, i.e. the column count by remain the same, however, the number of rows containing information may increase.

S 45D 2' 58" E;297.74
N 59D 7' 11" E;102.1

Any help would be appreciated greatly.

Thanks.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
The easiest way may be to combine/concatenate all your fields into one column on another sheet, where you can add all the custom formatting you want directly by formula, then export that sheet, i.e.
Code:
=Sheet1!A1 & " " & Sheet!B1 & "D "  & Sheet1!C1 & "'" & ...
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top