How to assign a variable name to a worksheet in openpyxl?
Clash Royale CLAN TAG #URR8PPP How to assign a variable name to a worksheet in openpyxl? In openpyxl 2.4.8, is it possible to give a created Excel worksheet a name that depends on user input, for example? What I tried so far is the most obvious thing from openpyxl import load_workbook ... wb=load_workbook("Some_WB_name.xlsx") ws=wb.create_sheet("Data_set_", int(some_user_input)) but it gives me a worksheet called just "Data_set_". I also checked the docs https://openpyxl.readthedocs.io/en/2.5/index.html but did not find anything related there. Thanks in advance. 1 Answer 1 from this PDF documentation, the create_sheet method has two optional arguments: create_sheet create_sheet(title=None, index=None) create_sheet(title=None, index=None) This method will create a worksheet (at an optional index). Parameters Your user input is being passed as the second parameter ( inde...