Read Range: Identifier expected

I take the names of all the work sheets from a excel file and if the names match with a string, I’m trying to get the last row number of the worksheet. but as you see the pic, Identifier expeted.
SEK to EUR is the sheet name and match with “SEK to EUR” string name.
The sheet name matches exactly. I have no idea what the problem is.

Also I tried that “Excel Application Scope” with “read range” and Sheet.toString but the error continue to occur.

Also sometimes the first loop works well, but the same error occurs again from the second loop. And the first loop also counted using the logic below, but the wrong number came out.
-dt_LastRow.AsEnumerable.Where(Function(row) Convert.ToString(row(0)) <>"").CopyToDataTable.Rows.Count
-dt_LastRow.Rows.Count

I am sooooo beginner.

Hi

Welcome back to UiPath forum

use excel activity where search as “Excel Application Scope” and “read range” in activity panel and use them Instead of the “Workbook” activity for Excel.

Mention sheet name with .ToString

Cheers @rose.baek

can you post screenshot of your read range activity here? with the properties tab

Thank you so much for your help.

do what @Palaniyappan said

change
image
to
excel application scope + read range under “Excel” tab

I think you are still using workbook activities instead of excel activity

It should be working fine when replacing that read range activity with a Excel application scope and Read range

@rose.baek

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.