Hello Team,
I have an excel with 45 columns.
I want to keep only 13 columns.
These 13 columns can be or cannot be in that excel.
But if they are present they should be kept else not.
Looking for suggestions on this.
Regards,
Sateesh.
Hello Team,
I have an excel with 45 columns.
I want to keep only 13 columns.
These 13 columns can be or cannot be in that excel.
But if they are present they should be kept else not.
Looking for suggestions on this.
Regards,
Sateesh.
Welcome to the community
Excel.Sheet("Sheetname").Cell(UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnIndexToColumnLetter(45-currentitem) + "1")
…this will get the cell value into variablecheers
Create an array of the names of the columns you want to keep. Loop through all the column names that exist in your datatable and if the current column name doesn’t exist in the “keep these” array then delete it.
Use read range and after that use filter datatable in that u will have a option which column u can keep
Except he can’t hard code the columns in Filter Data Table because they might not all be there so it would fault.