Hi! How can I loop through the columns in a datatable and rename them? E.g. I’ve many columns titled Qn1, Qn2, Qn3… Qn100.
Currently I’m using send hotkeys in excel to find “Qn” and replace it with the desired string e.g. “ABC” to get ABC1, ABC2, ABC3… ABC100, then reading it into a datatable. But this seems rather inefficient, so is there a better way to do the same without using hotkeys, or after reading it into a datatable e.g. using replace or something similar?
I’ve read this topic (Data Table Loop Through Columns and Rename each column) but I just got the same error as the user did, and the last solution proposed doesn’t work for me because there’s hundreds of columns in the excel sheet so they can’t be renamed individually.