String character offset in excel cell string value
String character offset in excel cell string value
- Subject: String character offset in excel cell string value
- From: Stephanos Piperoglou <email@hidden>
- Date: Wed, 20 Oct 2004 16:41:24 +0300
I'm trying to parse a string contained in an Excel workbook
tell application "Microsoft Excel"
activate
set sheet1 to first worksheet of workbook "addresses_greek.xls"
set thisrow to row 7 of sheet1
select thisrow
set rec_name to the string value of the first cell of thisrow as string
set firstSpace to offset of " " in rec_name
display dialog "Offset of first space: " + firstSpace
end tell
When I try to compile this I get "Syntax error: Can't get " " in
rec_name. Access not allowed".
I'm kind of new to AppleScript (I'm a Java programmer in real life, and
my favourite scripting tool is Perl), and I don't get this. rec_name is
a string. Offset is a method of string. Why is access not allowed? I've
googled around but couldn't find an answer. I've tried about a million
different ways to search for a character in a string but can't. How do I
do this?
_______________________________________________
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