Monday, April 20, 2020

Oracle BI Publisher - Leading zeros truncated for excel reports - format numbers as text


   
 
Oracle BI Publisher - Leading zeros truncated for excel reports - format numbers as text
When you want to display some data which has leading zeros in EXCEL output you will not get the desired output. But in PDF it will come as what you are expecting. This is not with the issue of your data. This is due to the unique nature of the EXCEL cell format. When you are trying to put a text data in a cell without making any change to cell format it will treat as the number and it will truncate all leading zeros and all trailing zeros after '.' . So what you have to do is to convert that data into a format that EXCEL can treat as text.  
1. In the rtf template, add two spaces before the column.
2. Use the following xml tag
<fo:bidi-override direction=”ltr” unicode-bidi=”bidi-override”> <?format-number:INVOICE_NUMBER;’09999999′?> </fo:bidi-override>” 
3. Instead of the using the tag < ? INVOICE_NUMBER? >
use  =”<?INVOICE_NUMBER?>”. 
Excel treat value as character and doesn’t trim the leading zeors of value.

No comments:

Post a Comment

Types of animations

Animation is a diverse and creative field with a variety of styles that artists and filmmakers use to bring their visions to life. Here are ...