Dynamic excel file

hello! I have use excel dynamic path that have headers but when I want to delete one or filtering the sheet I don’t know how because it doesn’t show like static excel file is there any idea to how make it more simple to show the headers?

1 Like

@rskalqahtani Please elaborate your concern. Check in properties write range activity tick headers option. Hope this shall help you out.

@rskalqahtani If you want to delete the headers first you should know what are the headers. For that use the below one

[How to get the column names from a DataTable UiPath - RPA Learners]

You can use the below expression to get the column header name of any excel file with any number of columns in it

  1. First read the excel with read range activity and get the output as dt

  2. Use a assign activity like this

list_columnname = (From dc In dt.Columns.Cast(Of DataColumn)
Select dc.ColumnName.ToString).ToList()

Where list_columnname is a variable of type System.Collections.Generic.List(of String)** defined in variable panel with default value as New List(of String)

Then based on the column names and count you have you can perform the operation you want

Cheers @rskalqahtani