Skip to Content
0
Jan 22, 2021 at 03:15 PM

Source File with Variable # of Columns

42 Views

I have a situation where I need to import a .TXT file. Sometimes it will have 23 columns, and sometimes an additional 24th column. I don't need the data in the 24th column, but can't control what is sent to me.

Is there a way to import the file and ignore the 24th column, if it is there ?

Or if 23 columns are sent, place an 'X' or some value into the target file in column 24 ?

Or, can I somehow count the # of columns, and branch to different routines to import either 23 or 24 columns ?

Any other suggestions ?