[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] AppleScript & Excel



At 12:30 -0800 2000.10.13, Yosemite wrote:
><x-html><!x-stuff-for-pete base="" src="" id="0" charset=""><HTML>
><HEAD>
><TITLE>AppleScript &amp; Excel</TITLE>
></HEAD>
><BODY>

Ack!  Please send non-HTML mail to the list.  Thanks.


><FONT SIZE="2">the following script will not set the value of cell A1 in
>Excel when run from MacPerl, the errNum from AppleScript is -10006, cant
>set obj/data to obj/data. The AppleScript portion does function properly
>when run as an AppleScript. What can I do to have this run from
>MacPerl?<BR>
><BR>
>#!perl<BR>
><BR>
>$script = &lt;&lt;EOS;<BR>
>try<BR>
> &nbsp;&nbsp;&nbsp;tell application &quot;Microsoft Excel&quot;<BR>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set Value of Cell
>&quot;$A$1&quot; to &quot;1&quot;<BR>

You are sending the value "".  $A is a variable, $1 is a variable.  You
want to $script = do <<'EOS' (single quotes around EOS) or escape the
dollar signs like "\$A\$1".

-- 
Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Development Network    pudge@osdn.com     http://osdn.com/

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org