String to double conversion

Hi i am not able to convert my excel column from text to double .Please help


Can you use Convert.ToDouble(row(Columnname or index).tostring)

You cannot directly pass the entire row, you have to pass the column index or column name


Try like the following,


Check this link for more information,

There is an error :
Assign: Input string was not in a correct format.

1 Like

Hi @preksha_srivastava,

Can you print the value first what row(“Column name”) has

Can you share your expression, and let us know the value in row(“ColumnName”)

You are getting the error because you are storing double value in variable,

Please be clear what are you trying to achieve, help us with the values in assign statements

I just need to convert this into double to filter values

Then just give convert.todouble(Value in excel)

Can you please give full solution for this:
The column name is"Actual Hours"
I have read range and then i am using assign activity,but what to use in assign activity.

Hi @preksha_srivastava,

After read range, i think you want each value from the excel, to use it somewhere

  1. Read Range,Use For each row
  2. Print the value row(“Actual Hours”).tostring
  3. Convert to double. - Convert.todouble(row(“Actual Hours”).tostring)

I want to filter the values of the excel sheet that are less than or equal to 40,but unable to do so because the data is in text format.After filtering write it into new sheet.This is the problem.Please help by whole process by the flowchart.

Please provide the excel sheet.

UI.xlsx (16.8 KB)

Refer the below workflow.

Main (20) (1).xaml (8.0 KB)

what is write line doing

Nothing, i am just printing the value to see, how i am getting the value from excel

Did id work or not?

When i am using it,the error is cannot find column name

Dear @preksha_srivastava,

The column name in excel and the column name in select statement should match, you are getting the error because its not matching.

Print the column name in excel first and if there are any spaces, paste as it in the select statement.

I have used the same excel file you provided and was able to successfully get the output