Get dynamic sheet in excel office 365

good to all, I have a problem

context: I had my robot that worked with office 2016, where a task was to obtain the name of the sheet dynamically (Because the name could be anyone), it used excel application scope and get workbook sheet, but it changed to office 365 and excel application scope, no longer detecting and I can’t get the name of the sheets

is there a way to solve my problem, a package or an activity, but that works with office 365

How good are you with Python?

1 Like

@SenzoD
more or less, what is the solution? :eyes:

Install Python, run it with cmd

install penpyxl, and use code like this:

import openpyxl
from openpyxl import load_workbook

wb=openpyxl.load_workbook(r'python_file.xlsx')

_all_sheets = wb.sheetnames
for _sheet in _all_sheets:
    #your code here
    print(_sheet)


#This will print out all the sheet names
1 Like