Page 1 of 1
Number in Excel cell-variable
Posted: Thu Apr 16, 2009 7:34 am
by carroll
How do I assign a number in an Excel cell to a variable? I understand how to use "get text" when the cell has text content....but ???? if the content is a number?
Carroll
Number in Excel cell-variable
Posted: Thu Apr 16, 2009 7:43 am
by Migg
Maybe you can copy the number into the clipboard and then assign it to the variable.
Number in Excel cell-variable
Posted: Thu Apr 16, 2009 7:52 am
by carroll
Migg,
Thanks for the help. I was copying to the clipboard, but was hung-up on using "get text". Somehow your answer made me think to use the "set variable" and assign the clipboard content to the variable.
thanks
Number in Excel cell-variable
Posted: Thu Apr 16, 2009 9:35 am
by carroll
Migg,
oops...that doesn't work - assigning the clipboard content to a variable only works for text.
I must be missing something....I would think it would be easy to assign the numeric value in an excel cell to a variable - right ??? Carroll
Number in Excel cell-variable
Posted: Fri Apr 17, 2009 2:18 am
by Migg
You can easily assign numbers to variables.The answer from Oleg to my question was:
Oleg wrote:Just set 0 or 1 or 2, etc
You can't declare the typed variables. You must set the numeric value only
Number in Excel cell-variable
Posted: Fri Apr 17, 2009 5:25 am
by carroll
Oleg, I don't want to type in the value 1,2, etc. I want Robotask to read the number = such as 23.45 - in the cell into the variable and then continue with the task. I tried to set the variable to {clipboardcontent}, but that doesn't work for my situation because when I use "copy" in subsequent actions, the variable changes.
Thanks
Number in Excel cell-variable
Posted: Sun May 03, 2009 3:38 am
by Oleg
Excel addes end-of-line symbols to content, when you try to get cell value into clipboard.
So you have to remove EOL symbols before using (see STR Trim)