• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Excel 2004
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Excel 2004


  • Subject: Excel 2004
  • From: "Reese, Stevan" <email@hidden>
  • Date: Tue, 21 Sep 2004 11:09:08 -0700

I wrote a script for Excel X and InDesign 2.
I'm now trying to adjust it for use with Excel 2004. The earlier posts
regarding Excel 2004 have been most helpful and I thank you all.

Here's an issue I've discovered. It seems that only Macintosh paths and file
names without spaces truly work.

The dictionary says;
save: Save an object
save  reference  -- the object to save
    [in  Macintosh path/Posix path]  -- the file in which to save the object
    [as  add in/CSV/CSV Mac/CSV MSDos/CSV Windows/DBF2/DBF3/DBF4/DIF/
Excel2/Excel2 east asian/Excel3/Excel4/Excel5/Excel7/Excel9795/Excel4
workbook/intl add in/intl macro/workbook normal/SYLK/template/current
platform text/text Mac/text MSDos/text printer/...]  -- the file type of the
document in which to save the data

This code works as expected; (space in volume name, not in filename)
tell application "Microsoft Excel"
    tell active workbook
    save sheet 1 in "Macintosh HD:AttendanceLog.txt" as current platform
text
    end tell
end tell
--The file was saved.

This one fails; Does this mean that Posix path is not really supported? Or
what did I miss?
tell application "Microsoft Excel"
    tell active workbook
save sheet 1 in "/AttendanceLog.txt" as current platform text
    end tell
end tell
--The event log
tell application "Microsoft Excel"
    save sheet 1 of active workbook in "/AttendanceLog.txt" as current
platform text
        "Microsoft Excel got an error: sheet 1 of active workbook doesn't
understand the save message."

This also fails; (spaces in volume name:file name)
tell application "Microsoft Excel"
    tell active workbook
    save sheet 1 in "Macintosh HD:Attendance Log.txt" as current platform
text
    end tell
end tell
--The event log
tell application "Microsoft Excel"
    save sheet 1 of active workbook in "Macintosh HD:Attendance Log.txt" as
current platform text
        "Microsoft Excel got an error: sheet 1 of active workbook doesn't
understand the save message."

This also fails; (spaces in volume name:folder name:file name)
tell application "Microsoft Excel"
    tell active workbook
    save sheet 1 in "Macintosh HD:untitled folder:Attendance Log.txt" as
current platform text
    end tell
end tell
--The event log
tell application "Microsoft Excel"
    save sheet 1 of active workbook in "Macintosh HD:untitled
folder:Attendance Log.txt" as current platform text
        "Microsoft Excel got an error: sheet 1 of active workbook doesn't
understand the save message."

This works; (spaces in the path but not the name)
tell application "Microsoft Excel"
    tell active workbook
    save sheet 1 in "Macintosh HD:untitled folder:AttendanceLog.txt" as
current platform text
    end tell
end tell
--The file was saved.

I'm able to work with it as is but it took some time to figure out what was
happening.
Regards
Stevan

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Excel 2004
      • From: "Shane Stanley" <email@hidden>
  • Prev by Date: Re: Fade Itunes
  • Next by Date: Re : Vooley-voo... (was Bug ?)
  • Previous by thread: Re: Vooley-voo... (was Bug ?)
  • Next by thread: Re: Excel 2004
  • Index(es):
    • Date
    • Thread