Number in Excel cell-variable

Discuss RoboTask here
Post Reply
carroll
Posts: 12
Joined: Wed Feb 11, 2009 2:58 pm

Number in Excel cell-variable

Post 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
Migg
Posts: 10
Joined: Tue Apr 07, 2009 5:36 am

Number in Excel cell-variable

Post by Migg »

Maybe you can copy the number into the clipboard and then assign it to the variable.
carroll
Posts: 12
Joined: Wed Feb 11, 2009 2:58 pm

Number in Excel cell-variable

Post 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
carroll
Posts: 12
Joined: Wed Feb 11, 2009 2:58 pm

Number in Excel cell-variable

Post 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
Migg
Posts: 10
Joined: Tue Apr 07, 2009 5:36 am

Number in Excel cell-variable

Post 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
carroll
Posts: 12
Joined: Wed Feb 11, 2009 2:58 pm

Number in Excel cell-variable

Post 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 
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Number in Excel cell-variable

Post 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)
Post Reply