0

Stackoverflow

Hi python noob here. I been learning python for couple of weeks so I don’t know if this is possible or even super easy. I have an excel files with o lot of sheets, I have managed to create a python code that do all the changes I need to make on a single sheet and then saves it. I just need to type the sheet name run it then type another sheet name and run it again etc … Is there a way to make the code so it does all the sheets one by one when I run it? I was thinking about creating a list with all the sheets name and using a loop but not sure how… thank you.

1 Answers1

0

Use openpyxl module. You have the list of sheets in openpyxl object, so you can run over sheets as by list. You could find the solutions of similar problem here:

getting sheet names from openpyxl

Matt
  • 1
  • 2
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 15 '22 at 18:46