Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8881501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:21:36+00:00 2026-06-14T20:21:36+00:00

I am trying to write an Applescript program to create a spreadsheet, add data

  • 0

I am trying to write an Applescript program to create a spreadsheet, add data to it, and save the spreadsheet in a particular folder. I have code to create, fill-in, and save the spreadsheet, but I’m not able to specify the folder where the new file is to be saved.

The file is saved in the last folder where I saved a spreadsheet. If I include the full path to the folder where I want it saved(“/Users/david/Documents/test/foo.xls”), Excel 2011 creates a file named “:Users:david:Documents:test:foo.xls” in the folder where I had previously manually saved a spreadsheet. So for example, if I manually open Excel and create a spreadsheet and save it in a subfolder of my Documents folder named important, and now run the following script, the file will be created in the important folder, not the test folder.

tell application "Microsoft Excel"
    set wb to make new workbook
    tell active sheet
        -- Lots of code to fill in the data
    end tell
    set fn to "/Users/david/Documents/test/foo.xls"
    save workbook as wb filename fn file format Excel98to2004 file format overwrite yes
    close active workbook saving no
end tell

From various posts I’ve read, it appears one should be able to specify the full path, but the questions usually deal with previous versions of Excel. Also, I’m running Mountain Lion if that makes a difference.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:21:38+00:00Added an answer on June 14, 2026 at 8:21 pm

    The path type must be HFS instead of posix path.

    Use this:

    set fn to (posix file "/Users/david/Documents/test/foo.xls") as string

    Or:

    set fn to "diskName:Users:david:Documents:test:foo.xls"

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying write program in CUDA but I have problem with synchronization in the
I am trying write a function that generates simulated data but if the simulated
Trying to write a trivial application, But I have stuck into one of the
I have been trying to write some applescript that checks to see if the
Well this is my problem, Im trying to write a code in AppleScript in
I'm trying write a java program to send live microphone data over UDP, then
Trying to write a GLOBAL CBT HOOK, this is My code, but my hooking
I'm trying to write an AppleScript to query iCal and find all the events
I'm trying to write a simple AppleScript to do some text manipulation on the
I m trying write code that after reset set up rrpmax as 3000. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.