I am trying to add a sheet to the excel file: ex.xls and whenever I do it deletes all the previously made sheets.
How do I add a sheet to this excel file without deleting the other sheets?
Here is my code to create a sheet:
import xlwt
import xlrd
wb = Workbook()
Sheet1 = wb.add_sheet('Sheet1')
wb.save('ex.xls')
Below is using "openpyxl" to create a new sheet in an excel workbook.
If the sheets or workbook do not exist yet you will get an error, to avoid this
Depending on how you want to use it below is an example of writing info to multiple pages
I believe this is the only way to do what you want: