I have a .txt file that I need to extract data from. Below is an excerpt from the .txt file. I'm only showing one Loadcase ID (for WS1) below but there are multiple in the .txt file (i.e., WS1, WS2, WS3, etc.) I need a macro that can read through the txt file and extract to a new sheet the loadcase ID, and the tabulated data below Bearing loads. Essentially, I only want the data shown in red below. The data below Bearing loads should be separated into columns, so there should be four columns of data. Thanks in advance for any help, and let me know if I need to provide more details.
Sample data from txt file:
Loadcase ID: WS1 Name: STR III-Angle: 0
Multiplier = 1.000
Cap loads:
Type Dir Arm Mag1 x1/L Mag2 x2/L ft kips, klf,k-ft kips, klf,k-ft
------------------------------------------------------------------------------- Force X 0.00 -8.61 0.50 ---- ----
Column loads:
Col # Type Dir Mag1 y1/L Mag2 y2/L
---------------------------------------------------------------------- 1 UDL X -0.957 klf 0.03 ---- 0.90
Bearing loads:
Line # Bearing # Dir. Load, kips
-------------------------------------------------
1 1 X -31.23
1 1 Y -28.55
1 1 Z 0.00
1 2 X -31.23
1 2 Y 22.88
1 2 Z 0.00
1 3 X -31.23
1 3 Y 22.88
1 3 Z 0.00
1 4 X -31.23
1 4 Y 74.30
1 4 Z 0.00
2 1 X -31.23
2 1 Y -28.55
2 1 Z 0.00
2 2 X -31.23
2 2 Y 22.88
2 2 Z 0.00
2 3 X -31.23
2 3 Y 22.88
2 3 Z 0.00
2 4 X -31.23
2 4 Y 74.30
2 4 Z 0.00
Auto generation details
Sample excel sheet output:
WS1
Bearing loads
1 1 X -31.23
1 1 Y -28.55
1 1 Z 0.00
1 2 X -31.23
1 2 Y 22.88
1 2 Z 0.00
1 3 X -31.23
1 3 Y 22.88
1 3 Z 0.00
1 4 X -31.23
1 4 Y 74.30
1 4 Z 0.00
2 1 X -31.23
2 1 Y -28.55
2 1 Z 0.00
2 2 X -31.23
2 2 Y 22.88
2 2 Z 0.00
2 3 X -31.23
2 3 Y 22.88
2 3 Z 0.00
2 4 X -31.23
2 4 Y 74.30
2 4 Z 0.00
Sample data from txt file:
Loadcase ID: WS1 Name: STR III-Angle: 0
Multiplier = 1.000
Cap loads:
Type Dir Arm Mag1 x1/L Mag2 x2/L ft kips, klf,k-ft kips, klf,k-ft
------------------------------------------------------------------------------- Force X 0.00 -8.61 0.50 ---- ----
Column loads:
Col # Type Dir Mag1 y1/L Mag2 y2/L
---------------------------------------------------------------------- 1 UDL X -0.957 klf 0.03 ---- 0.90
Bearing loads:
Line # Bearing # Dir. Load, kips
-------------------------------------------------
1 1 X -31.23
1 1 Y -28.55
1 1 Z 0.00
1 2 X -31.23
1 2 Y 22.88
1 2 Z 0.00
1 3 X -31.23
1 3 Y 22.88
1 3 Z 0.00
1 4 X -31.23
1 4 Y 74.30
1 4 Z 0.00
2 1 X -31.23
2 1 Y -28.55
2 1 Z 0.00
2 2 X -31.23
2 2 Y 22.88
2 2 Z 0.00
2 3 X -31.23
2 3 Y 22.88
2 3 Z 0.00
2 4 X -31.23
2 4 Y 74.30
2 4 Z 0.00
Auto generation details
Sample excel sheet output:
WS1
Bearing loads
1 1 X -31.23
1 1 Y -28.55
1 1 Z 0.00
1 2 X -31.23
1 2 Y 22.88
1 2 Z 0.00
1 3 X -31.23
1 3 Y 22.88
1 3 Z 0.00
1 4 X -31.23
1 4 Y 74.30
1 4 Z 0.00
2 1 X -31.23
2 1 Y -28.55
2 1 Z 0.00
2 2 X -31.23
2 2 Y 22.88
2 2 Z 0.00
2 3 X -31.23
2 3 Y 22.88
2 3 Z 0.00
2 4 X -31.23
2 4 Y 74.30
2 4 Z 0.00