• 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: As and Excel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: As and Excel


  • Subject: Re: As and Excel
  • From: Stan Cleveland <email@hidden>
  • Date: Thu, 02 May 2013 14:15:57 -0700

On May 2, 2013, at 1:19 PM, Robert Cuilla wrote:

> I need to open an Excel spreadsheet, "sheet1xlsx,  and then delete column 3.  Any help is appreciated

Hi Bob,

How about this?:
     tell application "Microsoft Excel"
          open alias "MacHD:Users:stanc:Desktop:Excel_doc.xlsx"
          delete range range "C:C"
     end tell
What seems like terminology stutter ("range range" in line 3) is more understandable if we split that line into the command (delete range) and its object (range "C:C").

I'm using Excel 2011, but the code above should work for Excel 2004 or later. Excel has a scripting dictionary that is broad, deep, and rich.

Enjoy,
Stan C.


 _______________________________________________
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: As and Excel
      • From: Stan Cleveland <email@hidden>
References: 
 >As and Excel (From: Robert Cuilla <email@hidden>)

  • Prev by Date: Re: evalhate without parsing?
  • Next by Date: Re: evalhate without parsing?
  • Previous by thread: As and Excel
  • Next by thread: Re: As and Excel
  • Index(es):
    • Date
    • Thread