|Feb 12, 2009, 04:56 PM||#1|
Applescript can't tell excel to open a workbook
I don't ask questions of forums without spending a great deal of time searching for answers first. But this one seems so easy yet it hasn't worked after hours of searching
I wan excel to open a workbook. I have excel 2004 and OSX
my code is
tell application "Microsoft Excel" to open workbook workbook file name "HD:User:internesktop:learningAS:SL__FORECAST.xls" with read only
the error I get is from excel saying
"SL__FORECAST.xls" cannot be accessed the file may be read-only, or you may be trying to access a read only location. Or the server the document is stored on may not be responding. "
I've tried it with "read only", and without. Tried it with different files that have been local and on a server. I've tried it with excel open and closed. I've tried changing the permissions on the file to be world read-writeable. I've tried all kinds of different syntax modifications among them:
tell application "Microsoft Excel" to open "HD:User:internesktop:learningAS:SL__FORECAST.xls
I keep getting the same error. Does applescript run as some kind of funny user?
thanks in advance,
"Applescript is so easy it's like writing in english" <-- ********
|Feb 12, 2009, 09:38 PM||#2|
Yeah, I have the same problem with Excel files. Dunno why it does that but there is definitely a problem there (my files are not password protected and they reside on my local drive, and the same thing happens even with a new, blank .xls or .xlsx doc).
But, you can get around it like this, using the UNIX open command:
do shell script "open -a /Applications/Microsoft\\ Office\\ 2008/Microsoft\\ Excel.app ~/Desktop/test.xls"
Go outside, the graphics are amazing!
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|AppleScript: How do I save multiple Excel sheets to one pdf using Applescript||sbtaylor1||Mac Programming||0||Oct 28, 2013 11:38 PM|
|AppleScript: How do I save multiple Excel sheets to one pdf using Applescript||sbtaylor1||Mac Applications and Mac App Store||0||Oct 28, 2013 11:32 PM|
|Display workbook name in Excel 2011 in Full Screen||3leggedpony||Mac Applications and Mac App Store||0||Oct 4, 2012 12:15 PM|
|Applescript. Copy filtered cells in Excel||Palkan||Mac Programming||2||Jul 3, 2012 10:34 AM|
|Applescript with Excel||tayjayt||Mac Programming||1||Jun 27, 2012 05:44 PM|
All times are GMT -5. The time now is 07:08 PM.