Skip to content Skip to sidebar Skip to footer

Editing Existing Excel Workbook Using Xlrd, Xlwt And Xlutils

How to edit and save the data in an existing excel workbook using xlrd, xlwt and xlutils module? could someone please provide a sample code to edit and save the data in excel workb

Solution 1:

You can save with wb1.save('workbook1.xls'). You might get an IOError that the file already exists. In that case try to os.remove() the file before saving.


Solution 2:

I agree with the previous answer of using the xlwt library save method. But you should also do some proof reading of your code. You are missing a closing quote for Sheet1 and variable names cannot have spaces.


Post a Comment for "Editing Existing Excel Workbook Using Xlrd, Xlwt And Xlutils"