Excel 2004 to clipboard to Finder
Excel 2004 to clipboard to Finder
- Subject: Excel 2004 to clipboard to Finder
- From: Philip Regan <email@hidden>
- Date: Mon, 1 Aug 2005 14:37:20 -0400
Howdy--
I've upgraded from Excel v.X to 2004 on 10.3.9 and I'm hvaing a
problem porting a s a script to the new version. The part that is the
problem is that I copy columns of text from Excel to the clipboard for
sorting and parsing. The original code looked like this:
tell application "Microsoft Excel"
[activate, open worksheet]
repeat with c from 1 to (get the count of columnsLettersAll)
CopyObject column (item c of columnsLettersAll)
set dataText to clipboard as text
[process text in subroutines]
end repeat
end tell
According to the 2004 dictionary and the Excel2004AppleScriptRef.pdf,
this should work:
tell application "Microsoft Excel"
[activate, open worksheet]
repeat with c from 1 to (get the count of columnsLettersAll)
set currentColumn to (item c of columnsLettersAll)
set theRange to currentColumn & "2" & ":" & currentColumn &
((imageCount + 1) as string)
set dataRange to range theRange of sheet 1
copy range dataRange
set dataText to clipboardt
[process text in subroutines]
end repeat
end tell
What's happening is the data is being copied to the clipboard, but
won't go to the dataText variable. I just get "missing text" in the
Event Log. I've tried adding a Tell to the Finder, and similar
variations, but to no avail/ . Anyone have an ideas?
Thanks!
--
Philip Regan
email@hidden
http://homepage.mac.com/pregan
RB 5.5.5/2005, Mac OS 10.3.9, Mac-centric development
_______________________________________________
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