Search
Tuesday, January 06, 2009 ..:: Wiki ::.. Register  Login
Number formatting Excel cells

If your template is a Word document with a table, and your output is an Excel report, beware of these common errors.

  1. Lets say your data is numbers in the form $12,345.67 and so each cell then will be populated with currency amounts. So your output is now a row of numbers you can now sum, change the format on, etc - correct? 
    No! It looks right but actually what you have is a bunch of cells containing text and Excel does not see them as numbers. For these to be numbers the cells should have a value of 12345.67 and a format of "$#,###.00" And the only way to do this is to design the template in Excel because Word has no concept of cell number formatting.

  2. Lets say your data is in the form of 12.345,67 and your locale is a European country so it will parse this correctly and read the number correctly as 12345.67. And you set the pattern="$#,###.00" so it will output it in the currency format. All set right?
    No! Again, the cell value is not a number such as 12345.67 but is instead a string "$12,345.67" and that is not a number. Again, to make this work you need to design your template in Excel, not Word.




 |   |  View Topic History  |
Membership Membership:
Latest New User Latest: GrahamA
New Today New Today: 0
New Yesterday New Yesterday: 0
User Count Overall: 56

People Online People Online:
Visitors Visitors: 1
Members Members: 0
Total Total: 1

Online Now Online Now:
All contents copyright (c) 2002 - 2008 by Windward Studios, Inc. All Rights Reserved.   Terms Of Use  Privacy Statement