Opening txt file in Excell - leading zeros needed

rdriver

New Member
Joined
Dec 10, 2004
Messages
6
I need to open a .txt file with Excel. When I open the file, leading zeros are stripped.

It is OK if the data is converted to text in the process.
I can modify the program that generates the txt file to include an apostrophe in front of the number but then it imports and shows the apostrophe. I don't want the apostrophe to show.

Am I on the right track? Any suggestions?

Thanks
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I think I found the answer to my question, I put ="00987" with the equals sign and quotes and it looks like it works.

It looks like this board is extremely busy, many thanks to you guys that spend your time helping others.
 
Upvote 0
I am helping our programmer, he creates the txt file for the user who then opens it by right clicking on the file name and then selecting open with Excel.
 
Upvote 0
So you do get a series of menus pop up?

If so, on the Text Import Wizard - step 3 of 3 menu, make sure to make the column hoding those leading zeros of type Text.
 
Upvote 0
You know what is weird, I thought you would get an import wizard of some type but since it is saved as a tab delimited file (with a .txt extension) it just opens in Excel without the import wizard.
 
Upvote 0
in order to get the wizard, you need to open the .txt file through the excel open menu, not by right clicking the file in windows explorer.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,738
Members
448,988
Latest member
BB_Unlv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top