How can I get the Numeric cell value of an Excel File

Queries related to T-Plan Robot
Post Reply
herbmich

How can I get the Numeric cell value of an Excel File

Post by herbmich » Wed May 04, 2011 4:02 pm

When I tried to read an cell value from an Excel file I always get an string back with the parameter "_EXCEL_CELL_VALUE". The parameter "_EXCEL_CELL_TYPE" shows me that the type of my cell is "NUMERIC".
My main problem is, that I want to multiplicate the Excel cell value in my T-Plan script. But it doesn't work because I can only read strings.

Knows someone more about this ?

here is a the part of my code:

Excel select row={row} column=1 evaluate=true id=1

Var fehlercode="{_EXCEL_CELL_VALUE}"

Var cell_typ="{_EXCEL_CELL_TYPE}"

Warning "{fehlercode}"

Warning "{cell_typ}"

Var fehlercode={fehlercode}*100

Warning "{fehlercode}"

rpes
User
User
Posts: 74
Joined: Thu Oct 29, 2009 5:43 pm
First Name: Robert
Last Name: Pes
Company: T-Plan

Re: How can I get the Numeric cell value of an Excel File

Post by rpes » Wed May 04, 2011 9:09 pm

Replace:
Var fehlercode={fehlercode}*100
with:
Eval fehlercode={fehlercode}*100
The "Var" command just concatenates strings. The "Eval" one on the other hand expects a numeric expression, calculates its value and assigns it back to the specified variable.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest