Support Article

Decimal Field value not captured properly when it read from file

SA-34252

Summary



As 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.


Error Messages



Not Applicable


Steps to Reproduce

  1. Use 'MSOParseExcelFile' activity to parse the excel file
  2. In the excel give 5.1 in one property
  3. It is being stored as 5.09999999996 in clipboard instead of 5.1.


Root Cause



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.

Resolution



Here’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


100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.