How to get the Sheet name from Excel

Eduardo Bernabe Sacahui Diaz September 26, 2016 22:18
Thank you, thank you, for your help

I’ve tried to do what you suggested but now its saying “Object reference not set to an instance of an object.”

I created a var Mywb for the excel scope,

then assigned the variable IEnumerable as follows:

sheetname = Mywb.getsheets

after that, I used a writeline in a" for each" sheetname, because I dont want to use another excel and I dont know the sheetname on the file I’m using.

the problem is on output variable, but I dont know how to fix it, because normally when you use a variable and write a dot after shows you the possible activities but this is not the case.

1 Like