ExcelWorkbookScope.CurrentWorksheet.Name not returning worksheet name

Hi All, Need advice on using ExcelWorkbookScope.CurrentWorksheet.Name to get Worksheet property of worksheets like “Name,Range,Row”. But I am getting exception. Please find the screen attached. Thanks in advance for the pointers / suggestions.

This does seem like it may be a bug… Many people have reported the same issue, but what you can do it use ExcelWorkbookScope.GetSheets and assign it to a variable of type System.Collections.IEnumerable and then you can loop through your sheet names and verify your sheet exists or elevate a sheet based on what is in that collection.

Just be sure to set the type of the For Each to System.Collections.IEnumerable if you intend to do anything with that. Below is a screenshot of a workflow (I don’t know why my variables turned navy blue, it’s really frustrating though, sorry about that):

Hi Mike, Thanks for the time and reply. Yes you are right to get the sheets.

Cool! :+1: