String to double


#1

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?


#2

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


#3

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


#4

@PULKITGUPTA can you attach your xaml file


#5

Double Variable = Double.Parse(String Variable)

Regards
JothyPrasanth M


#6

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


#7

Try this

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


#8

Tried that also.no luck


#9

Try this

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


#10

Can you attach your workflow? Meanwhile try this -


#11

Hi
Please follow this