Hi,
I am reading amount from Excel 1234.20 or 1234.00 with ToString conversion. I am not getting the zeroes leading or trailing. Thank you,
Hey @A_Learner
Try this method:
amount.ToString("F2") = 1234.00 format

Hi @A_Learner
Try enabling Preserve Format Option in the Property.If the output DataType is System.String then it will print the exact value present in excel. If you Output variable DataType is System.Double then use strvar.ToString("F2")
Without enabling Preserve Format Option also you can do the process but Output DataType should be System.Double and you should use the syntax strvar.ToString("F2")
Please specify what are the activties are you using.
Input:

Enabling Preserve Format and output DataType System.String
Enabling Preserve Format and output DataType System.Double
Value1.ToString("F2")
Without enabling Preserve Format output DataType System.Double
Hope you understand!!
Regards
you can convert the data to text format before reading it @A_Learner
- open excel, highlight the column containing the text
- data-> text to columns

3,. click next until this page, click text and finish
- now if you read from UiPath the leading/trailing zeroes will be there!
Thank you so much for teaching me something new @vrdabberu @pikorpa @jack.chan
You’re welcome @A_Learner
Happy Automation!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.



