I am have a bunch of tab-delimited txt files, that I am trying to read into a datatable and eventually output to an excel file. Currently, read the text file to a string variable, and generate a datatable from that string.
It works for the files where there are no column headers at all, or they are the very first row.
But the problem is, that in some cases, the first row of the file is some dummy data, while the second row are the actual headers.
I cannot seem to figure out how to make that second row my datatable headers as well. I can ignore the first row, but then the default headers (Column1…) are added on top. Is there any way to drop the defaults and use second row as the headers?