How to preserve Leading zeros in XML Publisher Excel Ouputs

In XML Pub Excel Reports excel removes the leading Zeros and prints the whole number. There are many instances where we need to print the zeros for eg item numbers starting with 0.

There are many ways to achieve this, one of the simple ways is to convert the number to character by adding space at the end.

concatenate two spaces after the xml tag as shown below in your template.

<?concat(<XMLTag>,’  ‘)?>

Downside of it is you will not be able to use excel features like sum , count etc on this specific column.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s