How to count the number of sheets in the excel file

Hi Guys,

How to count the number of sheets (sheet 1,sheet 2…sheet n) in the excel file.?
Please let me know your answers,

Thanks in Advance,

you can use an assign with Wb.Sheets.Count

Hi @TimK,

Tried the same,but no luck :frowning:

if you can send me the sample files,that willbe great

@rpadev please check attached file NextSheetExl.zip (85.3 KB)

1 Like

Hey…Thanks @indra .It works perfectly

1 Like