Excel: How to Format UPC With Leading Zero
Please note that this post is over a year old and may contain outdated information.

Since UPCs have 12 digits, you can use a Custom format to make Excel format the UPC as a 12-digit number and fill in the leading 0. To do so, right-click the UPC cell (or range of cells), click "Format Cells...", select "Custom", and then enter twelve 0's into the "Type" field like so:

What this does is format the UPC as a number and then fill in leading 0's if your input is less than 12 digits. Excel still removes leading 0's from input, but this makes sure the leading 0 still displays, and will be present if you export to CSV or TXT.
