On Mon, Nov 16, 2015 at 11:20 AM, Michiel Overtoom <mot...@xs4all.nl> wrote: > > Hi, > >> On 16 Nov 2015, at 18:14, syedmwaliul...@gmail.com wrote: >> For some reason it doesn't save the file. > > Did you get an error message? > >> excel.activeWorkbook.SaveAs ("c:\TurnData.xlsx") > > When you use backslashes in strings, don't forget to escape them: > >> excel.activeWorkbook.SaveAs("c:\\TurnData.xlsx") > > or use raw strings: > >> excel.activeWorkbook.SaveAs(r"c:\TurnData.xlsx")
You can also just use a forward slash: excel.activeWorkbook.SaveAs("c:/TurnData.xlsx") Windows happily accepts this. -- https://mail.python.org/mailman/listinfo/python-list