Excel format from Generic to Number


#1

Hello friends,
I’m trying to change the format of a Generic variable in order to save it in the Excel file as a Decimal Number.


when I try to save the variable in the Excel file it saves only 0, not the correct value.

Can you help me in finding a solution?
I tried different options but didn’t manage to find the correct solution.
Thank you so much,
Camilla. :slight_smile:


#2

@CamiCat

Convert the Generic variable type to Decimal by using
Double A=Convert.ToDouble(GenericVariable.ToString)

Regards,
Mahesh


#3

Thank you @MAHESH1.
The problem is that when I copy the value in Excel il saves it as a text and not as a Number


Do you know a way to save it in a Number format?
Thank you


#4

@CamiCat
I tried it by seeing the same issue in other post but still ididn’t get the solution. if I get i will let you know

Regards,
Mahesh


#5

Thank you so much @MAHESH1. If you get the answer please tell me :slight_smile:
Regards,
Camilla


#6

@CamiCat
Sure :slightly_smiling_face:

Regards,
Mahesh