My VBA macro will bring in a flat text file and a separate description of the text file that will describe how to take the fixed width data (no delimiters) and change it to columns.
Excel's texttocolumns functions seems to be the way to go but I need to know how to dynamically set the number of columns. The example below (recorded) shows the basic technique but it assumes three columns. I could have anywhere from 1 to 75 columns.
To be sure I could assume two columns and iteratively "parse" the table but this doesn't seem elegant enough.
I could also bring it in one line at a time but this also seems like a kludge? (In fact it is very slow).
Any ideas?
Excel's texttocolumns functions seems to be the way to go but I need to know how to dynamically set the number of columns. The example below (recorded) shows the basic technique but it assumes three columns. I could have anywhere from 1 to 75 columns.
To be sure I could assume two columns and iteratively "parse" the table but this doesn't seem elegant enough.
I could also bring it in one line at a time but this also seems like a kludge? (In fact it is very slow).
Any ideas?