• 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
Re: Excel chart as Picture file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Excel chart as Picture file


  • Subject: Re: Excel chart as Picture file
  • From: Lists <email@hidden>
  • Date: Sun, 13 Oct 2013 11:40:29 -0700

On Oct 13, 2013, at 12:12 AM, Keerthi Perera <email@hidden> wrote:

I have some thousands of Excel charts to be used as pictures in a movie file. Can someone kindly tell me how to write an applescript to save a given chart as a picture file in a separate folder? Thanks you.

I don't use Excel much, but I wrote a script a couple of years ago to batch convert Excel files to PDF. You specified as a picture. If you need to convert PDF to another image format, there are Automator workflows around to do that.

The Excel Script (save as a droplet i.e. application):

(* Drag and drop conversion (duplication) of Microsoft Excel files to PDF files using Excel 2008. *)

on open fillist
set bs to "/"
set d to "-"
tell application "Finder"
set defLoc to container of (item 1 of fillist) as alias
end tell
set destn to choose folder with prompt "You are converting (duplicating) Excel files to PDF files" & return & "Select a location to save converted files." default location defLoc
repeat with lvar in fillist
tell application "Finder"
set thename to name of lvar
set filex to name extension of lvar
set l to length of filex
end tell
set nuname to text 1 thru text item -(l + 1) of thename
if "/" is in nuname then
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to bs
set txtLst to every text item of nuname as list
set AppleScript's text item delimiters to d
set nuname to txtLst as string
set AppleScript's text item delimiters to oldDelims
end if
set filname to (destn as string) & nuname & "pdf"
tell application "Microsoft Excel"
launch
open lvar
save as active sheet filename filname file format PDF file format
close window 1 saving no
end tell
end repeat
end open

 _______________________________________________
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

References: 
 >Excel chart as Picture file (From: Keerthi Perera <email@hidden>)

  • Prev by Date: Excel chart as Picture file
  • Next by Date: savedsearch files
  • Previous by thread: Excel chart as Picture file
  • Next by thread: Re: Excel chart as Picture file
  • Index(es):
    • Date
    • Thread