• 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
Saving an Excel worksheet as a .pdf file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Saving an Excel worksheet as a .pdf file


  • Subject: Saving an Excel worksheet as a .pdf file
  • From: Bill Guion <email@hidden>
  • Date: Tue, 16 Dec 2014 16:52:51 -0500

I'm trying to create and save an Excel worksheet as a .pdf file. The script below is my current attempt. I have removed all of the Excel manipulation portion of the script to help focus on the file save portion. The manipulation portion works just fine. The script starts by prompting me for a csv file. The display dialogs all show the values I expect for the various values. The script runs without error, but no file is saved. I would really appreciate someone pointing out my errors.

-- find the csv file
set myLifeList to choose file with prompt "Locate Bill's Life List"

-- define folder to save .pdf into
set pdfSavePath to "/Macintosh HD:Documents:pdfs:" as string

tell application "Microsoft Excel"
	activate
	open myLifeList
end tell

SNIP

tell application "Microsoft Excel"
	copy value of cell "N2" to filename
	display dialog "filename is " & filename
	display dialog "pdfSavePath is " & pdfSavePath
	set fullName to pdfSavePath & filename & ".pdf"
	display dialog fullName
	try
		save active sheet in fullName as PDF file format
	end try
end tell


Thanks in advance.

     -----===== Bill =====-----
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


  • Follow-Ups:
    • Re: Saving an Excel worksheet as a .pdf file
      • From: Lists <email@hidden>
    • Re: Saving an Excel worksheet as a .pdf file
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: Javascript for automation quastions
  • Next by Date: Re: Saving an Excel worksheet as a .pdf file
  • Previous by thread: [related] iOS enters the automation game
  • Next by thread: Re: Saving an Excel worksheet as a .pdf file
  • Index(es):
    • Date
    • Thread