Hi there, I have a data able with 10 columns. I’d like to delete columns 0, 3, 4, 6, 9 from the table (zero based).
I’ve attempted using Invoke Method + RemoveAt with parameter set to
‘In’, Int32 and 0.
This only deletes the first column. When I add more columns to the parameter list, e.g. 0, 3, 4…, I get an error.
Does anyone know how I can drop multiple columns in one go, without having to do iterate through the dt?
Why not just use filter datatable?
you can do this.
But if you are working with datatable its great to follow @CBlanchard
Thanks @CBlanchard - initially tried that option, because it seemed the best way to do it, but I didn’t get the awesome result you’re getting so I changed tack - will go back and try again .
Did you get error @cnjackson in the result ?
Thanks everyone, solution marked. The filtering did the trick - really not sure what I missed but it might have been an output variable was incorrectly set.
Amazed at the responses! Thanks again for the speedy help.
No Worries @cnjackson were here to help.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.