JasonCannon
IS-IT--Management
I need to create a table based on a list of names a numbers, like the example below.
Alpha;100;55, 77, 91, 93-99
Bravo;200;25, 29, 33, 44
Charlie;300;10-13, 15-18, 61, 67-70
The list is given in a semi-colon delimited text file.
I need to generate a table in the following format.
Name Code Number
Alpha 100 55
Alpha 100 77
Alpha 100 91
Alpha 100 93
Alpha 100 94
Alpha 100 95
Alpha 100 96
Alpha 100 97
Alpha 100 98
Alpha 100 99
Bravo 200 25
Bravo 200 29
Bravo 200 33
Bravo 200 44
Charlie 300 10
Charlie 300 11
Charlie 300 12
Charlie 300 13
Charlie 300 15
Charlie 300 16
Charlie 300 17
Charlie 300 18
Charlie 300 61
Charlie 300 67
Charlie 300 68
Charlie 300 69
Charlie 300 70
Getting the first two columns seem easy. I just seem to be running into problems with loops and getting the third column.
As you can tell, the given list specifies ranges of numbers, and I need to generate a record for each number within those given ranges. And there can be several ranges given per line, along with individual numbers.
Any help would be much appreciated.
Alpha;100;55, 77, 91, 93-99
Bravo;200;25, 29, 33, 44
Charlie;300;10-13, 15-18, 61, 67-70
The list is given in a semi-colon delimited text file.
I need to generate a table in the following format.
Name Code Number
Alpha 100 55
Alpha 100 77
Alpha 100 91
Alpha 100 93
Alpha 100 94
Alpha 100 95
Alpha 100 96
Alpha 100 97
Alpha 100 98
Alpha 100 99
Bravo 200 25
Bravo 200 29
Bravo 200 33
Bravo 200 44
Charlie 300 10
Charlie 300 11
Charlie 300 12
Charlie 300 13
Charlie 300 15
Charlie 300 16
Charlie 300 17
Charlie 300 18
Charlie 300 61
Charlie 300 67
Charlie 300 68
Charlie 300 69
Charlie 300 70
Getting the first two columns seem easy. I just seem to be running into problems with loops and getting the third column.
As you can tell, the given list specifies ranges of numbers, and I need to generate a record for each number within those given ranges. And there can be several ranges given per line, along with individual numbers.
Any help would be much appreciated.