Read 1st sheet of all the excels


#1

I am trying to read only the 1st sheet of all the excel files in a directory. But the problem is while using read range I have to specify the sheet name but the sheet names are different for all the excel files. How can I ask it to read only the 1st sheet irrespective of the name in the for each loop?


#2

@jamnanin
Try this in place of sheetname in Read Range Activity
Excelsheet1=xlwbook.Sheets.Item(1)

Regards,
Mahesh


#4

I am getting an error on this


#5

@jamnanin, Follow this links,

Regards,
Dominic :slight_smile:


#6

@Dominic
thanks. got it