Re: Need help: Really silly Excel 2004 question
Re: Need help: Really silly Excel 2004 question
- Subject: Re: Need help: Really silly Excel 2004 question
- From: "Shane Stanley" <email@hidden>
- Date: Wed, 13 Oct 2004 21:26:20 +1000
On Wed, 13 Oct 2004 12:53:04 +0200, Richard Rönnbäck wrote:
>I need to get the names of used cell in an Excel sheet, like "A1", "C5" etc
>
>I can refer to a cell with such strings if I set it's value, but I cant
>figure out how to get that value in return from a cell, neither from the
>dictionary or in any of the properties I get in return if I run:
>
>tell application "Microsoft Excel"
> set myUsedRange to used range of sheet 1 of workbook 1
> return properties of cell 1 of myUsedRange
>end
>
>The cell has a range, but I can't figure out how to coerce an Excel range to
>string either, so I can't filter the string either.
>
>I could of course check for first column and row index, but I figure there
>must be a better way.
>
>Any help or a code snippet would be greatly appreciated
You can get the addresses in "$A$1" format like this:
tell application "Microsoft Excel"
set myUsedRange to used range of sheet 1 of workbook 1
get address (cell 1 of myUsedRange) reference style A1
end tell
Although in your case you might want "get address local" instead.
--
Shane Stanley <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden