I don't know about using the @ in the format. However, when I need leading zeroes in an HTML file that will be opened by Excel, I use the mso-number-format with the HTMLSTYLE style attribute. You might want to double check with Tech Support that this is OK. When I ran this code, I did get leading zeroes in the file that Excel opened. I tried number_format="00000" first, by itself, but that did not cause leading zeroes. Only using the HTMLSTYLE style attribute worked.