I am deleting a column by its header name in excel file but the format of the file changes like its color and border vanish…how can i keep the format same
which method you are using to delete the column?
Welcome to uipath community
Kindly elaborate this pls
Like how the input will look like and how the output should be
remove data column
use this method!
The excel file columns some column and their headers contains colors like red and orange etc…
when i delete the column with a name say “ABC” it gets delete but the format that is all the header colors and cell colors get remove…
how can i enter the table name in string, i’m getting a datatable
you are getting datatable as a string and deleting a strings from it??
look i’m getting datatable and in the for each loop i getting the column name as string and in my if condition, if the name matches, that whole column gets delete from the folder
Use this activity where mention the position and the no of columns you want to delete
To find the position with column
—use a excel application scope and pass the filepath as input
—inside the scope use a READ RANGE activity and get the output with a variable of type datatable named dt
—now use a Assign activity like this
int_position = dt.Columns.IndexOf(“yourcolumnname”)+1
Now use the above suggested activity and mention the position as int_position
it’s throwing error on position…but i have mentioned int_position in it.
May I know the error we got
the error is System.Argument.Exception…and it throws on position of insert/delete columns activity
I would like to see the property panel of that activity
If possible kindly share the screenshot pls
This actually looks fine
I wonder why so
Can I have the error screenshot
on my excel file there is a paragraph written on the top of the headers…may be thats creating issue…