• 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: 2551 <email@hidden>
  • Date: Wed, 21 Aug 2013 08:50:05 +0700

set theValues to value of every cell of column 1 whose value is not 0.0


That appears to run endlessly on my machine, and even if given a range, still returns an error. 

I believe you need to get the end of the range. See p360 of the Excel2004AppleScriptRef.pdf:

set theEnd to get end range "A1" direction toward the bottom

That'll return a reference like this

range "[maybe.xlsx]Sheet1!$A$7" of application "Microsoft Excel"

where "A7" was the last cell to have a value. However, I note that if I leave a few more empty cells than put something in "A13" it doesn't look that far, and still returns A7 as the end of the range.

A safe bet might be to simply define a range longer than you know its going to be by some large margin, e.g. range "A1: A1000". If most of that range is empty, it shouldn't have an undue effect on speed.





Best

Phil
http://applehelpwriter.com

 _______________________________________________
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: Thomas Fischer <email@hidden>
References: 
 >AS and Excel (From: "koenig.yvan" <email@hidden>)
 >Re: AS and Excel (From: "koenig.yvan" <email@hidden>)

  • Prev by Date: Re: AS and Excel
  • Next by Date: Re: AS and Excel
  • Previous by thread: Re: AS and Excel
  • Next by thread: Re: AS and Excel
  • Index(es):
    • Date
    • Thread