My web application exports data in tab delimited format. One of the column contains long strings of numbers that are IDs. Some of these number strings contain leading zeros. Is there anyway to get Excel 2003 to treat the number strings as "Text", instead of treating them as number and trim the leading zeros?

migrated from stackoverflow.com Jul 7 '11 at 6:16

This question came from our site for professional and enthusiast programmers.


Add the apostrophe' character before the string, and it will treat it as text, and not display the apostrophe.


Put the data in " in the tab delimited file. Excel when importing will treat it as a string data type

simon[tab]"01792272"[tab]other data


Try adding a space character in front of the number.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.