maybe you need to use the constant instead of "CSV", i.e. k.CSV_file_format
On Fri, Mar 18, 2011 at 12:00, <pythonmac-sig-requ...@python.org> wrote: > Send Pythonmac-SIG mailing list submissions to > pythonmac-sig@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/pythonmac-sig > or, via email, send a message with subject or body 'help' to > pythonmac-sig-requ...@python.org > > You can reach the person managing the list at > pythonmac-sig-ow...@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Pythonmac-SIG digest..." > > Today's Topics: > > 1. Appscript and Excel save_as (Dan Ross) > > > ---------- Forwarded message ---------- > From: Dan Ross <d...@rosspixelworks.com> > To: Pythonmac sig <pythonmac-sig@python.org> > Date: Thu, 17 Mar 2011 13:57:19 -0500 > Subject: [Pythonmac-SIG] Appscript and Excel save_as > > Hi there- > > I have the following AppleScript: > > set theOutputPath to (path to desktop folder as string) & "My Saved > Workbook.csv" > tell application "Microsoft Excel" > tell active workbook > save workbook as filename theOutputPath file format CSV file format > end tell > end tell > > This works fine. When I try to use appscript I cannot get the stinking > spreadsheet to save as a CSV file with the following: > > > > from appscript import * > > excel = app('/Applications/Microsoft Office 2008/Microsoft Excel') > excel.open('/Users/danr/Desktop/Test.xlsx') > name = excel.worksheets[1].name.get() > print(name) > excel.worksheets[1].save_as(filename = 'boogers.csv', file_format = "CSV") > > > > Any pointers? > > > > Thanks, > > > > Dan > > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > >
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG