import openpyxl try: WB = openpyxl.load_workbook(\'Config/Test_Sheet2.xlsx\') WB.save(self.filename) WB.close() except Exception as e: print(e)