Read Range (Add Headers, Unchecked). Remove Column with Index of respective Column. Write Range (Add Headers, Checked). Let us know if the column index is not fixed, well’ll work on another approach.
Sure… @Nithin_P it will help but need to check with column indexing part because Im not sure is that column index is every time same or not… just let me know the approach in case if it is not fixed?
Its not about just removing column from the excel their is condition based scenarios like “if i found any of column has another duplicate column from same excel sheet then i want to remove the other columns except 1st one”
The function checks that the current column header we’re checking matches anything in the row containing the headers. There will always be at least one match, so the Count function will be 1 or higher. If there are duplicates, it will be 2 (or higher if there are multiple duplicates). If there are multiple columns with the same name, delete the current column.
Also, just found a bug in the process. We do not want to increment the index if we delete a column.
ok cool…but i need very first column in excel if we found any column name with the very first column then i want to delete those column except the very first one.
The process worked with the example input contained in the project I uploaded. If your input is different, please share a copy of the workbook with proprietary data replaced with dummy data so we can address the issue.
Hi, I have faced the same issue, and I created this workflow. It is a dynamic workflow which deletes the duplicate columns. You can try this, hope it helps for fellow community members.
Workflow - Remove _Duplicate _Columns_Dynamically.xaml (13.7 KB)