Save as XML with Applescript and Excel 2008

M

Mattias

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: intel

I used to have a VBA macro that saved my current active workbook as an XML spreadsheet in Excel 2004 and now I'm trying to get the same function using Applescript. I can get it to change the file name and save and automatically overwrite without any problems, however, it doesn't change the file format to XML. It saves it as the new xlsx format. The "VBA to AppleScript Migration Guide" doesn't work at all because they use the wrong syntax there for Excel 2008 and the syntax that the Applescript Dictionary suggests doesn't work for the "file format" parameter, although it doesn't throw any error messages. The code below is what I currently have and that one will save the file, change the file name and overwrite any already existing files. But it doesn't save it as XML... Has anyone had this problem before or know what I'm doing wrong?

tell application "Microsoft Excel"
save as active sheet filename "network.xml" file format "Excel XML file format" with overwrite
end tell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top