Leading and Trailing zeroes truncated and Long Numbers display in scientific notation in excel

来源:互联网 发布:ubuntu wine 配置 编辑:程序博客网 时间:2024/05/17 21:54
Microsoft Excel is too smart and it identifies whether the value in the cell is a Text or number and applies formatting accordingly. 
This sometimes becomes an issue for us when we are trying to generate an excel report. 
For example Customer number 006358 has all the numbers and starts with zero, this when printed in excel report displays it as 6358. 
Hence all the leading zeroes are truncated. Same issue happens when we have decimal and trailing zeroes.
What was more, for those Long numbers such as Invoice number 102000514789 is printed as 1.02001E+11.

To handle this problem, you can specify the formatting type as "Regular Text" and choose "Force LTR"
FO formatting options will be used to get away with this problem. Below is the syntax for same.
<fo:bidi-override direction="ltr" unicode-bidi="bidi-override">
<?CUSTOMER_NUMBER?>
</fo:bidi-override>
0 0