AppleScript 'String Value' problem (BUG?).

P

pxlucn

When retrieving the 'value' of a range I get a list lists. When doing
a 'get XML value' of the same range I get a result but when asking for
the 'string value' I get an empty list. I think this is a bug. Can you
please confirm this and can somebody somewhere have a look at it?!

The problem is that when a number was entered in Excel and you asked
for it's value you get 20.00, when you ask for it's string value you
get the string as visible in Excel at the moment, so it could be 20.
The strange thing is that you can retrieve the string value of one
cell but not from a range.

Example:

tell application "Microsoft Excel"
tell active sheet
set mRange to range (("A1") & ":" & ("Z25"))
set mRowValues to value of mRange
-- Result: list of lists
set mRowValues to string value of mRange
-- Result EMPTY
end tell
end tell


Thanks!
 
J

JE McGimpsey

When retrieving the 'value' of a range I get a list lists. When doing
a 'get XML value' of the same range I get a result but when asking for
the 'string value' I get an empty list. I think this is a bug. Can you
please confirm this and can somebody somewhere have a look at it?!

The problem is that when a number was entered in Excel and you asked
for it's value you get 20.00, when you ask for it's string value you
get the string as visible in Excel at the moment, so it could be 20.
The strange thing is that you can retrieve the string value of one
cell but not from a range.

It certainly seems to be a bug, and short of building the list of lists
by looping through the range, I can't come up with a workaround.

It will be interesting to see if this is fixed in XL2008. Since
AppleScript compatibility has been a primary emphasis in that version, I
wouldn't be surprised if it has been.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top