1700 error when try to get/read value from a xlxs
Hi,
I am a beginner and trying to write an AppleScript that will read the cell value from an xlsx file located in document folder. I am storing the values (username and password) in an Excel sheet and will pass the values to login into skype.
On my 1st step of the scripting, while retriving the value got 1700 error. Here is my script
Here is my code
tell application "Numbers"
set f to POSIX file "/Users/admin/Documents/DDSheet1.xlsx"
set x to value of range ("A2:A4") of Sheet1 of f as string
display dialogx
end tell
This is the error message
tell application "Numbers"
get value of range "A2:A4" of Sheet1 of file "Macintosh HD:Users:admin:Documents:DDSheet1.xlsx"
--> error number -1700 fromSheet1 of file "Macintosh HD:Users:admin:Documents:DDSheet1.xlsx" tospecifier
Result:
error "Can’t make «class NMCv» of «class NmCR» \"A2:A4\" of Sheet1 of file \"Macintosh HD:Users:admin:Documents:DDSheet1.xlsx\" into type string." number -1700 from «class NMCv» of «class NmCR» "A2:A4" of Sheet1 of file "Macintosh HD:Users:admin:Documents:DDSheet1.xlsx" tostring
Mac mini, OS X Yosemite (10.10.2)