Why can't I “save as” an Excel file from my Python code?
问题 I have an Python ExcelDocument class that provides basic convenience methods for reading/writing/formatting Excel files, and I'm getting a strange error in seemingly simple Python code. I have a save and saveAs method: def save(self): ''' Save the file ''' self.workbook.Save() def saveAs(self, newFileName): ''' Save the file as a new file with a different name ''' self.workbook.SaveAs(newFileName) The save method works perfectly, but when I try to call the saveAs method - myExcelObject.saveAs