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
I am sooooo beginner.