Import certain data form multiple text files.

guswyl

New Member
Joined
Feb 14, 2013
Messages
6
Hi All,

I've been struggling </SPAN>for a while trying to import certin data from multiple text files.

The data looks like this:

HOSTNAME#
---------- LOTS of DATA ------------
HOSTNAME#show interfaces
GigabitEthernet1/1 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet Port, address is 000e.83a2.54ac (bia 000e.83a2.54ac)
Description: TEST DESC 2
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, link type is auto, media type is 1000BaseLH
Media-type configured as SFP connector
input flow-control is on, output flow-control is off
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:03, output never, output hang never
Last clearing of "show interface" counters 4y14w
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 376000 bits/sec, 116 packets/sec
5 minute output rate 114000 bits/sec, 91 packets/sec
27770771945 packets input, 17924901299373 bytes, 0 no buffer
Received 2215373216 broadcasts (2204558422 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
82962322254 packets output, 99384008305173 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
GigabitEthernet1/2 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet Port, address is 000e.83a2.54ac (bia 000e.83a2.54ac)
Description: TEST DESC 2
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, link type is auto, media type is 1000BaseLH
Media-type configured as SFP connector
input flow-control is on, output flow-control is off
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:03, output never, output hang never
Last clearing of "show interface" counters 4y14w
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 376000 bits/sec, 116 packets/sec
5 minute output rate 114000 bits/sec, 91 packets/sec
27770771945 packets input, 17924901299373 bytes, 0 no buffer
Received 2215373216 broadcasts (2204558422 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
82962322254 packets output, 99384008305173 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
HOSTNAME#
HOSTNAME#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active
123 VLAN_123 active Gi2/1, Gi2/2, Gi2/3, Gi2/4
Gi2/5, Gi2/6, Gi2/7, Gi2/8
321 VLAN_321 active Gi2/1, Gi2/2, Gi2/3, Gi2/4
Gi2/5, Gi2/6, Gi2/7, Gi2/8
444 VLAN_444 active Gi2/1, Gi2/2, Gi2/3, Gi2/4
Gi2/5, Gi2/6, Gi2/7, Gi2/8
999 VLAN_999 active Gi2/1, Gi2/2, Gi2/3, Gi2/4
Gi2/5, Gi2/6, Gi2/7, Gi2/8
1000 VLAN_1000 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
HOSTNAME#
---------- LOTS of DATA ------------



I'm looking to import each text file into it's own sheet labeled with the HOSTNAME (minus the #)

I'm trying to get to the following:

ABCD
HOSTNAMEINTERFACEDESCRIPTIONMEDIA TYPE
HOSTNAMEGigabitEthernet1/1TEST DESC 21000BaseLH
HOSTNAMEGigabitEthernet1/2TEST DESC 21000BaseLH

<TBODY>
</TBODY>


Also if possible an additional table
FG
VLAN IDNAME
123VLAN_123

<TBODY>
</TBODY>
Etc

I'm not even sure if this is possible but any help or guidance would be great.

Thanks
G
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,215,212
Messages
6,123,655
Members
449,113
Latest member
Hochanz

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