String to double

Hi,

I am reading a excel to create a dt.In my excel I have many cloumns but a column “amount” has values in double format,but in my dt it is taken as string.Now I have to write those values in excel as double only but the bot is writing it as string values.

Any way to write it in double format?

1 Like

Use “convert.ToDouble” dot net code to convert your excel values as double…

Tried that but no luck.Tried parse.double also.As I have to change the data type in the dt itself before dumping it to excel

@PULKITGUPTA can you attach your xaml file

Double Variable = Double.Parse(String Variable)

Regards
JothyPrasanth M

1 Like

I used inside for each row:- Row(“Amount”)=convert.todouble(row(“Amount”))

I also tried Generic type Variable =convert.todouble(row(“Amount”).tostring) and then Row(“Amount”)=Generic type variable

Try this

Row(“Amount”)=convert.ToDouble(row(“Amount”).ToString)

2 Likes

Tried that also.no luck

Try this

Convert.ToDouble(datatable_Name.Rows(0)(1).ToString)

Can you attach your workflow? Meanwhile try this -

Hi
Please follow this

Converting to Double a string var is fine, but how about when I need to use TypeInto Activity to insert double value into the box? Now TypeInto doesn’t allow var other strings, so is there way to insert a double value using TypeInto activity in a box?