The range whose column you are trying to clear does not match the filtered range for this sheet

Hello everyone, please help me take a look at why this issue is occurring. I can assure you that the columns I want to clear match the corresponding columns in the Excel sheet.
testTemplate.7z (96.6 KB)

@1585517965

Looks like the first row does not have the headers…if so you need to procide the first cell or range

Try like this

Excel.Sheet("SheetName").Range(Exccel.Sheet("SheetName").FullRangeName)

Cheers

@Anil_G
I’m still getting this error.

Hi,

It’s because there are multiple same name columns.(To avoid this, UiPath uses Column-1. Column-2 as column name)
So, can you try to reset Filter, next remove or rename columns which have same name, then set Filter again. The workflow will work.
Or can you try to use the following xlsx file?

test.zip (7.6 KB)

Regards,

@Yoichi hi
In my official document, the column names are not the same. Also, I’ve run it more than ten times before without encountering this issue, but today it keeps happening and I don’t know why.

Hi,

To isolate cause, can you try to output datatable like Excel.Sheet("20231122_103228").ToRawDataTable in immediate panel?

image

If the datatable has Column-1, Column-2 as column name, it’s column name matter.

If it’s including blank column, can you try to unset Filter then set Filter again not to including blank column.

Regards,

2023-11-27_131741
I have checked the printed data and it matches with the data in the Excel sheet. Will there be any errors when you download and execute the template I uploaded on your end?

Hi,

In this case, probably blank data causes this matter. DataTable Column name must be unique and not empty.

image

Regards,

@Yoichi hi
2023-11-27_132907

Regards

Hi,

Can you share this xlsx file, if possible?

Regards,

Hi
test.xlsx (9.9 KB)
Regards,

Hi,

In my environment, first I tried your file ant it failed. However, if unset Filter then set Filter again, it works. Something invisible settings may remains in the filter settings and it may causes matter.

test_new.zip (7.5 KB)

Regards,