Wednesday, October 12, 2011

Preserving a leading zero on a number in a text field in Excel

At work we're writing UPC codes to a TSV file. Often a UPC has a leading zero, which is automatically whacked when the file is opened in Excel. The trick is to write the UPC cell to the TSV file as

="027297909021"

This preserves the zero.