dssxpert
08-03-2006, 04:55 PM
Step 1 of 2
I would like to convert an imported text report into an Excel table or database. I can manually label the columns of my data but perferably the code would at least strip out the multiple report headers from the body of the data. Many reports do not repeat data in the sorted column(s). I would like the code to populate blank cells in the table as the following example shows.
Report:
State.City....... Client Amount
CA.... Glendale 11111 100.00
......................22222 200.00
.........Redlands 33333 300.00
MS.... Biloxi..... 44444 400.00
Table:
State.City....... Client Amount
CA.... Glendale 11111 100.00
CA.... Glendale 22222 200.00
CA.... Redlands 33333 300.00
MS.... Biloxi......44444 400.00
Step 2 of 2
On some of the reports I have, what would be considered a field in the final table is actually part of the page heading. For simplicity's sake, let's say that the page heading contains "County name: xxxxxxxxxxxxx" for the above report. I guess I would want the code to always look for "Country name:" and put the subsequent value in a field for the resulting table. You can assume that there is always a page break when a change in Country name occurs.
I've seen this done before at a former employer but I've Googled over 200 websites and was not able to find any code. Thank you in advance.
George
I would like to convert an imported text report into an Excel table or database. I can manually label the columns of my data but perferably the code would at least strip out the multiple report headers from the body of the data. Many reports do not repeat data in the sorted column(s). I would like the code to populate blank cells in the table as the following example shows.
Report:
State.City....... Client Amount
CA.... Glendale 11111 100.00
......................22222 200.00
.........Redlands 33333 300.00
MS.... Biloxi..... 44444 400.00
Table:
State.City....... Client Amount
CA.... Glendale 11111 100.00
CA.... Glendale 22222 200.00
CA.... Redlands 33333 300.00
MS.... Biloxi......44444 400.00
Step 2 of 2
On some of the reports I have, what would be considered a field in the final table is actually part of the page heading. For simplicity's sake, let's say that the page heading contains "County name: xxxxxxxxxxxxx" for the above report. I guess I would want the code to always look for "Country name:" and put the subsequent value in a field for the resulting table. You can assume that there is always a page break when a change in Country name occurs.
I've seen this done before at a former employer but I've Googled over 200 websites and was not able to find any code. Thank you in advance.
George