Object to integer converion

Hi Everyone ,

Can anyone please let me know how to resolve this error .

ggg

Thanks !
Priya

1 Like

Please convert object to Integer.

Convert.ToInt32(object)

Or

Int.Parse(object)

7 Likes

input string was not in format error is occurring.
can you help

1 Like

What are you trying to convert?
Can you place the input string.

@Aman_Mongar
Simple buddy,
in first assing activity, i hope you are getting from a datatable so type like
InvoiceAmount = Convert.ToInt32(row(ā€œyour column nameā€).ToString)

and in second writeline activity type like
"Invoice Amount : " + InvoiceAmount.ToString

Hope this would work buddy

Cheers…

1 Like

Actually I am trying to bring value from google sheet and convert it to Int so that I can compare the value. And I tried as you mention but it still giving same error that is ā€˜Input string was not in a correct format’.

Buddy can i see the error screenshot

image

I am using read cell to get a value

1 Like

@Aman_Mongar
Ahh buddy, for read cell you don’t need to have row mentioned in front its just a value of string datatype

so kindly mention in assign activity as
InvoiceAmount = Convert.ToInt32(out_Cell_Value.ToString)
where out_Cell_Value is the output value of Read cell activity

This would work buddy
Cheers…!

can you upload a script plz

1 Like

I m trying to convert a number from google sheet.
can you upload a xml file if you have the solution

Buddy @Aman_Mongar

Here is your xaml buddy

Main.xaml (5.9 KB)

Hope this would help you

Cheers…!

Thank You for help @Palaniyappan

1 Like

Is that working buddy…!

2 Likes

Yaa Thank you

Amazing…!

Cheers…Keep going buddy…!

1 Like

@Aman_Mongar
Buddy if you feel that you are done with solution, kindly close this thread with solution marked that could help others while looking for solution under your topic…

Cheers…

you are so kind and helpful