Error transferring data from Excel to BBedit

I am just starting to use AppleScript and am trying to transfer data from Excel to BBedit. The folloing script gives me an error:

set Item_num to “”
tell application “Microsoft Excel”
set Item_num to Cell “R1C1”
end tell
tell application “BBEdit”
set current glossary set to “HTML Glossary.html”
replace “#ITEMNUMBER#” using Item_num searching in text 1 of text window 1 options {search mode:grep, starting at top:false, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false}
end tell

The reported error is:

Can’t make <> “R1C1” of <> “MW Site Inventory copy” of application “Microsoft Excel” into the expect type.

I have scanned ‘Applescript For Application’ by Wilde but just haven’t been able to figure out what I’m doing wrong.


tell application "Microsoft Excel" to set Item_num to Value of Cell "R1C1"

Searching the BBS for “Excel” would have led you to this answer.