Uploading an Excel shows data in incorrect format in Pega
When users are trying to upload an excel with a date column,the data is parsed as number in Pega and is throwing an error.
**Trying to save an invalid page : Page is not valid
.xxx.datexx : 42370 is not a valid date value
.yyy.datebb: 45670 is not a valid date value
Steps to Reproduce
1) Create an excel with a date type column.
2) Upload the excel in Pega by using MSOParseExcelFile activity to parse the excel sheet
3) Observe the above issue.
Excel internally saves the date type column value as double so when the MSOParseExcel activity is used to parse the excel values , it is parsing them as it is i.e a double value and it is an expected behavior.
To overcome this developer need to convert the decimal value again back to the date value for this developer need to write the custom java code by using Apache POI libraries
below is the code snippet which can fix the issue.
Published April 1, 2016 - Updated October 8, 2020
Was this useful?
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.