Support Article
Decimal values with a comma are left aligned in Export to Excel
SA-10471
Summary
User has a report definition that has a decimal property as one of its columns. The column format is Number and right aligned.
On Export to Excel, decimal values with a comma for example 12,345.5 are left aligned whereas the others are right aligned.
The requirement is to ensure that all decimal values are right aligned.
Error Messages
Not Applicable.
Steps to Reproduce
1. Create a report in Pega 7 with decimal values and view in report viewer.
2. Click the export to excel link.
Root Cause
This is not an issue with PRPC. When the commas are there in the decimal values, Excel treats them as text and make them left aligned. So the values which have comma is displayed in left side of the cell when exported to Excel.
Resolution
Add the column format as Currency or Calculated Value for the decimal property in the Report definition ruleform. This ensures uniformity in the alignment.
Published June 12, 2015 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.