How do i read sheet names from excel using excel online activities?

Hi Team,

I have to read sheet names from excel located on SharePoint using excel online activities of office 365 package . Can anyone tell me ?

Thanks in Advance.

Regards,
Deepak

Hi @deepakchawla

Check the below thread

Regards

Index is not going to help…I need a sheet name

I have to first check if sheet name exist or not. if exist, we have to update excel else add sheet a then update excel.

@deepakchawla,

Connect to sharepoint where the excel is located then try to open the excel using file’s URL and using Get Sheets activity you will get a list of all the sheet names in the Excel file.

HAPPY AUTOMATION!!

Thanks Archana for reply.

I am not able to find Get sheet activity under excel online package

image

Hi @deepakchawla

Can you try like below

Regards,

Hi @deepakchawla

Use the below code in Invoke Code to get all the sheet names:

Dim app As Microsoft.Office.Interop.Excel.Application
Dim wb As Microsoft.Office.Interop.Excel.Workbook
app=New Microsoft.Office.Interop.Excel.ApplicationClass
app.Visible=False
app.AskToUpdateLinks=False
wb=app.Workbooks.Open(ExcelFilePath,False,False)
shArray=wb.Worksheets.Cast(Of Microsoft.Office.Interop.Excel.Worksheet).Select(Function(x) x.Name).ToArray
wb.close

Invoke Arguments:

You will get all the sheet names in an array variable.

Or you can try this process too:

Regards

working fine. Thank you very much for your help

1 Like

You can use for each excel sheet activity and get CurrentSheet.Name to get sheet name

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.