Decimal Field value not captured properly when it read from file
SummaryAs part of file upload option we are trying to load excel file and store same data into DB Table. But based on clipboard value we noticed its not taking actual value and added with many zero.
Steps to Reproduce
- Use 'MSOParseExcelFile' activity to parse the excel file
- In the excel give 5.1 in one property
- It is being stored as 5.09999999996 in clipboard instead of 5.1.
A defect or configuration issue in the operating environment
Excel truncates the decimals(5.1,8.8 etc) whose binary floating-point representation is infinite in order to display in the cell. Instead it saves as 5.0999999996 in its meta data.
ResolutionHere’s the explanation for the reported behavior:
Pega takes the data from the metadata of the excel file and hence stores the value that is present is metadata. This is related to MSExcel application.
Published February 27, 2017 - Updated March 3, 2017