Thursday, September 11, 2014

Preserve Leading zeros in Excel output - XML Publisher

Dear Readers

The requirement was to display some columns such as GL account#, department# from COA in an excel output via XML Publisher using an RTF template and since these fields have values such as 0001, 0002 etc. MS Excel would truncate the leading zeros and it ends up showing as “1”, “2” etc. which is not as per user requirement

So to overcome this, used help of below forum which provides the solution and in all these such fields have put the code as below which now helps to show the full text as 0001 and not as “1” (yellow part is the actual XML tag and bold part is the fix to preserve the zeros)


<fo:bidi-override direction="ltr" unicode-bidi="bidi-override"><?BRANCH_CODE?></fo:bidi-override>


Hope this is helpful to all J

Cheers
A

1 comment: