Re: AS and Excel
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.
|
_______________________________________________
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