Troush2009
asked on
Make a macro that inport data from a txt file into a excel file.
I have a excel file that I want to create a button on it. When button is clicked then it will pull dsts from a IDSOdump.txt file and put it in the excel file.
Below is an example of the IDSOdump.txt file data.
;ed-chan:::TR::dbchg=off,n aevt=off,s irpt=off,a ud=off:mlp =off;
DNVRCOIID31 09-03-30 07:26:45
M TR COMPLD
;rtrv-crs-ds0::ds0int-577- 1-1-1&&-24 :cb;
DNVRCOIID31 09-03-30 07:26:46
M CB COMPLD
"FROM=DS0INT-0577-1-1-01,T O=DS0INT-0 583-1-1-05 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F::,SST=RD LD"
"FROM=DS0INT-0577-1-1-02,T O=DS0INT-0 583-1-1-06 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F::,SST=RD LD"
"FROM=DS0INT-0577-1-1-03,T O=DS0INT-0 583-1-2-05 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F::,SST=RD LD"
"FROM=DS0INT-0577-1-1-04,T O=DS0INT-0 583-1-2-06 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F::,SST=RD LD"
"FROM=DS0INT-0577-1-1-05,T O=DS0INT-0 583-1-1-09 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F::,SST=RD LD"
"FROM=DS0INT-0577-1-1-06,T O=DS0INT-0 583-1-2-09 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F::,SST=RD LD"
"FROM=DS0INT-0577-1-1-23,T O=DS0INT-0 583-1-1-03 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F::,SST=RD LD"
"FROM=DS0INT-0577-1-1-24,T O=DS0INT-0 583-1-2-03 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F::,SST=RD LD"
;rtrv-crs-ds0::ds0int-577- 1-2-1&&-24 :cb;
DNVRCOIID31 09-03-30 07:26:51
M CB COMPLD
"FROM=DS0INT-0577-1-2-01,T O=DS0INT-0 583-1-1-15 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F"
"FROM=DS0INT-0577-1-2-02,T O=DS0INT-0 583-1-1-16 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F"
"FROM=DS0INT-0577-1-2-03,T O=DS0INT-0 583-1-1-17 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F"
"FROM=DS0INT-0577-1-2-04,T O=DS0INT-0 583-1-1-18 :CCSTATE=X C,DS0TC=TR SP,DS0TW=F F"
;rtrv-crs-ds0::ds0int-577- 1-3-1&&-24 :cb;
The only information I want in the spread sheet is every time it say "FROM=DS0INT-0577-1-1-01,T O=DS0INT-0 583-1-1-05 " I want the following in the spread sheet.
I would like to strip the 0 off of the begin of each number but if it is another number beside 0 then leave it.
Column A and Column B
577-1-1-01 583-1-1-05
IDSOdump.txt
Tellabs-iDS0.xls
Below is an example of the IDSOdump.txt file data.
;ed-chan:::TR::dbchg=off,n
DNVRCOIID31 09-03-30 07:26:45
M TR COMPLD
;rtrv-crs-ds0::ds0int-577-
DNVRCOIID31 09-03-30 07:26:46
M CB COMPLD
"FROM=DS0INT-0577-1-1-01,T
"FROM=DS0INT-0577-1-1-02,T
"FROM=DS0INT-0577-1-1-03,T
"FROM=DS0INT-0577-1-1-04,T
"FROM=DS0INT-0577-1-1-05,T
"FROM=DS0INT-0577-1-1-06,T
"FROM=DS0INT-0577-1-1-23,T
"FROM=DS0INT-0577-1-1-24,T
;rtrv-crs-ds0::ds0int-577-
DNVRCOIID31 09-03-30 07:26:51
M CB COMPLD
"FROM=DS0INT-0577-1-2-01,T
"FROM=DS0INT-0577-1-2-02,T
"FROM=DS0INT-0577-1-2-03,T
"FROM=DS0INT-0577-1-2-04,T
;rtrv-crs-ds0::ds0int-577-
The only information I want in the spread sheet is every time it say "FROM=DS0INT-0577-1-1-01,T
I would like to strip the 0 off of the begin of each number but if it is another number beside 0 then leave it.
Column A and Column B
577-1-1-01 583-1-1-05
IDSOdump.txt
Tellabs-iDS0.xls
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great work this is what I was looking for.
hope to see your reply soon.
Open in new window