Set column breaks programmatically when importing a file
Posted on 2014-02-25
I have a text file which is effectively a report that I need to import into Excel. In addition to the records I need, the file has a lot of other garbage (unneeded records, headers, page numbers, summary totals, etc).
Because this is a routine I have to do often, I'm getting tired of having to make manual adjustments in the text import wizard window. Plus, it's very time consuming.
Regarding the records I'm interested in, the data I need is always in the same position in the source file. What I mean by that is that (from left to right), I need bytes 1 thru 10 to be its own column, bytes 50 thru 59 to be its own column and bytes 60 thru 69 to be its own column. I don't care about any of the other data. It's ok if it gets imported into one or more other columns or not. I can get rid of the unnecessary data later on in a clean up procedure. Is there a macro that can accomplish this? Thanks.