Re: scripting excel
Re: scripting excel
- Subject: Re: scripting excel
- From: Hanaan Rosenthal <email@hidden>
- Date: Wed, 4 Feb 2004 8:20:18 -0500
- Organization: Custom Flow Solutions
Hello Shelly,
First, remember that Excel is recordable, so you can record commands and
learn some syntax from that.
Setting and getting values from Excel uses either the range object or cell
object.
You refer to a cell by using:
cell "R1C1" where the numbers following the R and C stand for the row and
column.
A range is:
range "R1C1:R10C5"
(top left and bottom right cells separated by colon.
The command is:
set Formula of Cell "R1C1" of ActiveWorksheet to the_value
This subroutine can be used to set cell values:
on set_cell_value(the_value, the_worksheet, the_row, the_column)
set theCell to ("R" & the_row & "C" & the_column as string)
tell application "Microsoft Excel"
set Formula of Cell theCell of Worksheet the_worksheet to the_value
end tell
end set_cell_value
Hanaan
>
>
I'm trying to write a script that will enter string values into excel cells.
>
>
First, how to set a title to the new document?
>
create new document with title "NEW" doesn't work
>
>
next, how to enter data into cells: addfield rowfield {string1, string 2}
>
gets "addfield can't continue
>
>
any and all help would be appreciated.
>
>
Thanx
>
>
shelly m
>
_______________________________________________
>
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.
_______________________________________________
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.