rharrington10
New Member
- Joined
- Feb 8, 2016
- Messages
- 4
Need to parse parts of a raw text file and convert it to an Excel file. Seems simple, and have tried multiple approaches, but none have been successful. Any assistance would be greatly appreciated.
I would provide actual files, but do not have permissions to post attachments.
sample data:
!
--More-- voice-port 2/0/0
no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
station-id name winter Analog
station-id number 58572000
caller-id enable
!
voice-port 2/0/1
no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
station-id name winter Analog
station-id number 58572001
caller-id enable
!
voice-port 2/0/2
no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
--More-- station-id name winter Analog
station-id number 58572002
caller-id enable
!
voice-port 2/0/3
no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
station-id name winter Analog
station-id number 58572003
caller-id enable
!
voice-port 2/0/4
no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
station-id name winter Analog
station-id number 58572004
caller-id enable
!
voice-port 2/0/5
--More-- no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
station-id name winter Analog
station-id number 58572005
caller-id enable
!
dial-peer voice 9992000 pots
corlist incoming international
description Analog phone
translation-profile incoming tp_add_cor
--More-- huntstop
preference 4
destination-pattern 58572000
progress_ind alert strip
authentication username 58572000 password 7 58572000
port 2/0/0
!
dial-peer voice 9992001 pots
corlist incoming local
description Analog phone
translation-profile incoming tp_add_cor
huntstop
preference 4
destination-pattern 58572001
progress_ind alert strip
authentication username 58572001 password 7 58572001
port 2/0/1
!
dial-peer voice 9992002 pots
corlist incoming international
description Analog phone
translation-profile incoming tp_add_cor
huntstop
--More-- preference 4
destination-pattern 58572002
progress_ind alert strip
authentication username 58572002 password 7 58572002
port 2/0/2
!
dial-peer voice 9992003 pots
corlist incoming national
description Analog phone
translation-profile incoming tp_add_cor
huntstop
preference 4
destination-pattern 58572003
progress_ind alert strip
authentication username 58572003 password 7 58572003
port 2/0/3
!
dial-peer voice 9992004 pots
corlist incoming international
description Analog phone
translation-profile incoming tp_add_cor
huntstop
preference 4
--More-- destination-pattern 58572004
progress_ind alert strip
authentication username 58572004 password 7 58572004
port 2/0/4
!
dial-peer voice 9992005 pots
corlist incoming international
description Analog phone
translation-profile incoming tp_add_cor
huntstop
preference 4
destination-pattern 58572005
progress_ind alert strip
authentication username 58572005 password 7 58572005
port 2/0/5
desired results:
[TABLE="width: 1170"]
<tbody>[TR]
[TD]voice-port[/TD]
[TD]no snmp trap[/TD]
[TD]cptone[/TD]
[TD]timeouts[/TD]
[TD]description[/TD]
[TD]station-id name[/TD]
[TD]station-id number[/TD]
[TD]caller-id[/TD]
[TD]corlist incoming[/TD]
[/TR]
[TR]
[TD]2/0/0[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572000[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/1[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572001[/TD]
[TD]enable[/TD]
[TD]local[/TD]
[/TR]
[TR]
[TD]2/0/2[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572002[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/3[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572003[/TD]
[TD]enable[/TD]
[TD]national[/TD]
[/TR]
[TR]
[TD]2/0/4[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572004[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/5[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572005[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/6[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572006[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/7[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572007[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/8[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572008[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/9[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572009[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/10[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572010[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/11[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572011[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/12[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572012[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/13[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572013[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/14[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572014[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
</tbody>[/TABLE]
I would provide actual files, but do not have permissions to post attachments.
sample data:
!
--More-- voice-port 2/0/0
no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
station-id name winter Analog
station-id number 58572000
caller-id enable
!
voice-port 2/0/1
no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
station-id name winter Analog
station-id number 58572001
caller-id enable
!
voice-port 2/0/2
no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
--More-- station-id name winter Analog
station-id number 58572002
caller-id enable
!
voice-port 2/0/3
no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
station-id name winter Analog
station-id number 58572003
caller-id enable
!
voice-port 2/0/4
no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
station-id name winter Analog
station-id number 58572004
caller-id enable
!
voice-port 2/0/5
--More-- no snmp trap link-status
cptone AP
timeouts interdigit 4
description Analog phone
station-id name winter Analog
station-id number 58572005
caller-id enable
!
dial-peer voice 9992000 pots
corlist incoming international
description Analog phone
translation-profile incoming tp_add_cor
--More-- huntstop
preference 4
destination-pattern 58572000
progress_ind alert strip
authentication username 58572000 password 7 58572000
port 2/0/0
!
dial-peer voice 9992001 pots
corlist incoming local
description Analog phone
translation-profile incoming tp_add_cor
huntstop
preference 4
destination-pattern 58572001
progress_ind alert strip
authentication username 58572001 password 7 58572001
port 2/0/1
!
dial-peer voice 9992002 pots
corlist incoming international
description Analog phone
translation-profile incoming tp_add_cor
huntstop
--More-- preference 4
destination-pattern 58572002
progress_ind alert strip
authentication username 58572002 password 7 58572002
port 2/0/2
!
dial-peer voice 9992003 pots
corlist incoming national
description Analog phone
translation-profile incoming tp_add_cor
huntstop
preference 4
destination-pattern 58572003
progress_ind alert strip
authentication username 58572003 password 7 58572003
port 2/0/3
!
dial-peer voice 9992004 pots
corlist incoming international
description Analog phone
translation-profile incoming tp_add_cor
huntstop
preference 4
--More-- destination-pattern 58572004
progress_ind alert strip
authentication username 58572004 password 7 58572004
port 2/0/4
!
dial-peer voice 9992005 pots
corlist incoming international
description Analog phone
translation-profile incoming tp_add_cor
huntstop
preference 4
destination-pattern 58572005
progress_ind alert strip
authentication username 58572005 password 7 58572005
port 2/0/5
desired results:
[TABLE="width: 1170"]
<tbody>[TR]
[TD]voice-port[/TD]
[TD]no snmp trap[/TD]
[TD]cptone[/TD]
[TD]timeouts[/TD]
[TD]description[/TD]
[TD]station-id name[/TD]
[TD]station-id number[/TD]
[TD]caller-id[/TD]
[TD]corlist incoming[/TD]
[/TR]
[TR]
[TD]2/0/0[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572000[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/1[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572001[/TD]
[TD]enable[/TD]
[TD]local[/TD]
[/TR]
[TR]
[TD]2/0/2[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572002[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/3[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572003[/TD]
[TD]enable[/TD]
[TD]national[/TD]
[/TR]
[TR]
[TD]2/0/4[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572004[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/5[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572005[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/6[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572006[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/7[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572007[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/8[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572008[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/9[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572009[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/10[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572010[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/11[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572011[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/12[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572012[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/13[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572013[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
[TR]
[TD]2/0/14[/TD]
[TD]link-status[/TD]
[TD]AP[/TD]
[TD]interdigit 4[/TD]
[TD]Analog phone[/TD]
[TD]winter Analog[/TD]
[TD]58572014[/TD]
[TD]enable[/TD]
[TD]international[/TD]
[/TR]
</tbody>[/TABLE]