Save as CSV applescript problem

M

mattjlovell

Hi,

I am new to applescript but have managed to write a droplet that takes
all excel files, strips away all unneeded data and saves the results. I
have created a second script that creates a graph in an app called
Chartsmith. To join these two scripts together I need to save the
excel file as a CSV file. I have read the microsoft scripting guide and
the resulting script runs without any errors and it does save the file
but not in CSV format.

Here is a script showing only the problem lines:

tell application "Microsoft Excel"
set new_Book to active workbook
save workbook as new_Book filename "test.csv" file format CSV file
format
end tell

Doe anyone know what is wrong with this script?
Thanks for any help,

Matt.

I use Excel 2004 with
Model: G5 1.6
AppleScript: 1.10
Operating System: Mac OS X (10.4)
 
M

mattjlovell

Hi,

I received this on the Macscripter list and it works!

Matt,

Try this:

tell application "Microsoft Excel"
activate
set f_path to path to desktop as string
save active workbook in f_path & "fooFile" as CSV
end tell

Regards,
Dave
 

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