[jawsscripts] Re: An Excel script

  • From: "Martin Slack" <m.g.slack@xxxxxxxxxxxx>
  • To: "JAWSScripts" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 11 Sep 2009 07:46:50 +0100

Hi Reed:

  Can you modify the following code for your purposes?

Script testExcel ()
Var
    int iCol,
    int iRow,
    string sAlphabet,
    string sCol

let sAlphabet = "abcdefghijklmnopqrstuvwxyz"
GetCellCoordinates (iCol, iRow)
SayString (SubString (sAlphabet, iCol, 1))
SayInteger (iRow)

EndScript


If you need to access more than 26 columns, you will need to extend the
sAlphabet string to include aa ... zz or even aaa ... zzz but the same code
should work.

hth

  Martin


----- Original Message ----- 
From: "Reed Poynter" <reed.poynter@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Thursday, September 10, 2009 11:43 PM
Subject: [jawsscripts] Re: An Excel script


> Thanks Martin, I had forgotten about the Extended Selection mode.  At a
> glance, this seems to work great.
>
> However, I'd still like to know if it is possible to get a cells
> coordinates
> into a variable in a script.  The coordinates being in the form A5; rather
> than 1 5.
>
> Thanks again Martin.
>
> -----Original Message-----
> From: jawsscripts-bounce@xxxxxxxxxxxxx
> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Martin Slack
> Sent: Thursday, September 10, 2009 15:31
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: An Excel script
>
> Reed,
>
>  This is purely an Excel feature, but if you select the first cell then
> hit
> F8, you enter extended selection mode, and the arrow keys will extend the
> selection (one cell at a time) as far as you want in any direction.
>
>  Are there any problems with this?
>
>  Martin
>
>
> ----- Original Message -----
> From: "Reed Poynter" <reed.poynter@xxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Thursday, September 10, 2009 7:08 PM
> Subject: [jawsscripts] An Excel script
>
>
>> Hi Scripters,
>>
>> In Ms Excel 2003, there is a Go To dialog where you can select blocks of
>> data based on a top left and a bottom right cell.
>> For example, in a spreadsheet, you hit F5 and specify A1:G6 and hit
>> enter.
>> The block of data is selected.
>>
>> I want to be able to do the following.
>> Go to the top left cell and hit a key to save its coordinates, go to the
>> bottom right cell, hit a second key to save its coordinates, put the 2
>> saved
>> coordinates together in a string and put it into the go to dialog.
>>
>> I don't know of anything in Excel that will do this for me.  So, I
>> thought
>> I'd write a JFW script to do it.
>>
>> I think my process would be to, with a hot key, save the coordinates of
>> the
>> top left cell to the clipboard,
>> With a second hot key, capture the bottom cell coordinates, and put them
>> together into a string with the first coordinates once retrieved from the
>> clipboard.
>> Save this new string to the clipboard,
>> Open Excel's Go To dialog and paste in my coordinates.
>>
>> My first problem is having the script determine the cell coordinates.
>> Looking through the functions in the Script Manager, the only guy I see
>> is
>> GetCellCoordinates.
>> If I am sitting on cell A5,  GetCellCoordinates (x, y) returns integers 1
>> and 5.
>> I need something that will give me a5.
>> Any suggestions?
>>
>>
>> Thanks.
>>
>> Reed
>>
>>
>> __________
>> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>>
>> View the list's information and change your settings at
>> //www.freelists.org/list/jawsscripts
>>
>
>
> ----------------------------------------------------------------------------
> ----
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.409 / Virus Database: 270.13.89/2360 - Release Date: 09/10/09
> 11:29:00
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>
>
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.89/2360 - Release Date: 09/10/09
11:29:00

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: