Re: Determining
Re: Determining
- Subject: Re: Determining
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 26 Nov 2007 20:12:35 -0800
- Thread-topic: Determining
On 11/27/07 1:03 AM, "Stan Cleveland" <email@hidden> wrote:
> On 11/26/07 6:42 AM, Justin Laden wrote:
>
>> I'm attempting to return the row number of last cell with data in a
>> Excel table. Is there a way to do this?
>
> Assuming Excel 2004, this should work (watch for text wrap):
>
> tell application "Microsoft Excel"
> set lastRow to first row index of (special cells range "A1:IV65535" type
> cell type last cell)
> end tell
>
> You can use a smaller range than "A1:IV65535" if you have some idea where
> the "last cell" is.
That's easy enough to determine:
used range of active sheet
So:
tell application "Microsoft Excel"
set lastRow to first row index of (special cells (used range of active
sheet) type cell type last cell)
end tell
--
Paul Berkowitz
_______________________________________________
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