How to avoid the trimming of leading zeros in XML Publisher - Excel output

When the XML Publisher creates the Excel output file with fields having leading Zero (Eg:- Position Number), when the ouput file is opend in the Excel (not in the web browser), the leading zeros in the will be automatically trimed by the Excel. Excel treat this as number, we need force excel to treat this value as character and not as numberic value.

During XML template design, Instead of the using the tag < ? fld_POSITION_NUMBER ? >
use  ="< ? fld_POSITION_NUMBER ? > ". It wraps the value with double quotes. Now Excel treat value as character and doesn't trim the leading zeors of value.

Note:- space between < and ? and tag name is not requried.



  1. Anonymous said,


    on February 17, 2015 at 7:50 AM