Hello guys i have created a table using build data table in which below column is double
Here the below marked value are decimal values while adding it the add data row and write into excel it is not giving the decimal point only the rounded figure.
I have used message box for that variable it is giving values with decimal.
2.I have used output data table and printed it, same it is giving the rounded value.
So is there any solution for this
@Gokul_Murali ,
In Add Data Row activity can you try passing the decimal value like this
Math.Round(Convert.ToDecimal(yourDecimalVariable), 2)
incase this works, you can change the last 2 number to your desired decimal points you want in your value.
Thanks,
Ashok
Hi @Gokul_Murali
Refer the following thread,
[grafik]
we had updated / added some additional docu references after posting the first version maybe it was overseen
Kindly note:
Regards,
Gowtham K
Hi @Gokul_Murali ,
You can use math.round to achieve the required format.
Math.round(“yourVariable”,2)
Thanks,
Anjani
@ashokkarale
Still iam getting the same rounded value
@Gokul_Murali ,
Change the format of the column before you write the range to the file.
Use Format Cells
activity to change the format.
When i printed only the variable it has decimal value like above
So when added that to that datatable and printed using Output data Table the value is rounded
sudster
(Sudster)
October 11, 2024, 7:37am
8
Why should it be a double? Just use String type and see what you get. Apply formatting on the output to convert to a double if you need to.
Guys I got the solution,
Its because iam using one column as int type in build data tabe activity accidentally the data is adding to that column
Now i have changed that to double
Thank you
1 Like