Wednesday, September 29, 2010

Microsoft Excel 2010 Bug Trims Leading 0's

Today I found myself writing a script which would export Microsoft Excel files for internet orders. After grinding away conforming to Microsoft's Excel sourcing format, I come to find out when I actually opened the excel file with Microsoft Excel, that numbers such as zip codes that contained leading zero's, no longer had the leading zero's! After double checking the source, the leading zero's were clearly present and all I could do was throw my hands up in the air and thank Microsoft.

A simple solution to this problem would be adding quotes around the numbers, even though it's not ideal, if a human is looking at the file they will be smart enough to realize a zip code does not contain quotations. Vice-versa if a computer is reading the file, it will see the leading zeros because the source actually contains the leading zeros, and the bug seems to be a front-end UI issue.

No comments:

Post a Comment