- If the file does not already have a .TXT extension, change the extension to .TXT:
- Locate the file with leading zeroes in Windows Explorer and right-click it. It may be necessary to change your folder options to display file extensions.
- Select Rename from the menu. Note: Do not open the CSV file in Excel before renaming it. Otherwise, you will lose the leading and trailing zeroes and will not be able to retrieve them.
- Change the extension from .CSV to .TXT
- Open Excel.
- Select File, Open from the menu bar.
- Change Files of type to All Files.
- Browse to the .TXT file.
- Highlight the file and click Open.
- Select the Delimited option and click Next.
- Unmark the Tab checkbox, mark the Comma checkbox, and click Next.
- Highlight the first column that has data containing leading zeroes and select Text as the Column data format.
- Repeat step 8 for each column that has data containing leading zeroes (in the example, the ZIP Code column).
- Click Finish. The file opens in Excel and retains the leading zeroes.
Connect and collaborate with fellow Blackbaud users.