• 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: Scripting Excel to go to the next row
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Excel to go to the next row


  • Subject: Re: Scripting Excel to go to the next row
  • From: bill <email@hidden>
  • Date: Thu, 24 Oct 2002 22:36:14 +0800

> I am looking for the correct syntax to get Excel to select the cell
> immediately below the currently selected cell. I have been searching AS
> sites and these archives for days trying to find this information.
>
> The task I'm trying to script is
>
> 1. paste a time-code (generated by a script in QT Player) into a cell
> 2. select the cell below this ready to begin the process (ie pasting) again

Anthony,

Would you consider a different method:

1. re-design your QT player script, build a list of time-code. Hope you
know how to make it, here's an example:

set timeCodeList to {"00:10:11", "00:21:09", "00:33:25", "00:35:22",
"00:41:01", "00:45:17", "00:51:19"}

2. You already know which column you will put the time-code in, eg.

Cell value(time-code)

R1C1 00:10:11
R2C1 00:21:09
R3C1 00:33:25
R4C1 00:35:22
R5C1 00:41:01
R6C1 00:45:17
R7C1 00:51:19

compose a list of each cell name (e.g. R1C1, R2C1,...), how many cell you
need is the number of item in timeCodeList; then loop through each cell and
set the value. No need to select the lower cell & paste. Most likely, this
method is faster.

So, try this script:


set timeCodeList to {"00:10:11", "00:21:09", "00:33:25", "00:35:22",
"00:41:01", "00:45:17", "00:51:19"}

-- the first time-code is put into the cell 1 of column 1
set inputRange to {}
repeat with rowN from 1 to count of timeCodeList
set end of inputRange to "R" & rowN & "C1"
end repeat

tell application "Microsoft Excel"
Activate
Select Sheet "Sheet1"
repeat with i from 1 to count of inputRange
set Value of Cell (item i of my inputRange) to item i of
timeCodeList
end repeat
end tell


bill
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Mac OS Version Sniffer
  • Next by Date: Re: Scripting in Excel -> search different words in column and color them
  • Previous by thread: Re: Scripting Excel to go to the next row
  • Next by thread: InDesign 2 box names
  • Index(es):
    • Date
    • Thread