How to get the Sheet name from Excel

I want to do same as option of excel move or copy .
Thanks

Can you copy the sheet to another Workbook and delete exisiting sheet?

image

My Excel sheet is protected and sent in eMail. I am downloaded and trying to read data when com exception is displayed. Is there alternate way to get sheet name

Hello,

can you please share me the document how you made the package procedure.

1 Like

It’s there… haha just right click and save as.

To get the Sheet Name follow the steps.

Step 1 : Insert activity Excel Application Scope and enter file path (with extension).

Step 2 : Create variable workbook with variable type UiPath.Excel.WorkbookApplication

Step 3 : Set properties Output : workbook

Step 4 : Create variable sheetName with variable type String

Step 5 : Insert activity Assign and assign workbook.GetSheets(0) to variable sheetName
sheetName = workbook.GetSheets(0)

Step 6 : Set properties To : sheetName and Value : workbook.GetSheets(0)

you will get the first sheet name in sheetName variable

5 Likes

this is the solution

1 Like

2 years passed, and this is still not solved…

Above solution is given for counting no of excel sheets.

How can we get name of sheets in an excel ?

Hi @Bharti_sanghmitra

You just have to get Output of Excel Application Scope as WorkbookApplication type and when you iterate on that array you will get sheet names See this -

SheetNames.xaml (7.8 KB)

Thanks,
Prankur

3 Likes

Thank you it worked.
But i wanted to get sheets name without opening excel sheet.

Hi @Bharti_sanghmitra,

I have uploaded a new release in BalaReva.Excel.Activities only for your purpose that to get sheets name from excel without open.

Regards
Balamurugan.S

2 Likes