Zero Suppression

G

Guest

I'm trying to figure out a way to change Excel's default of suppressing
leading zeros in a .CSV file. I open the file from Explorer and it opens in
Excel but the column that should have 5 digits doesn't include the leading
zeros. Example: 00323 would show as 323. If I send the file to Notepad, it
shows the zeros so I know they're there.

Is there a way to change it to not suppress the zeros? I'd like it to
default like that instead of going in to Format Cells and changing it through
there each time I open the file. This is a file that will be recreated
monthly for a customer.

Thanks so much!
Irene
 
G

Guest

Hi Irene,

Opent the file in notepad and Save it as file.csv and open this file in
excel file. Excel will prompt you to import dialogue box.
 
G

Guest

Thanks for the reply.

Tried it but it didn't prompt me to import. I've gone the import route
before but that's more steps than I'd like to put the customer through if I
can get around it.

I tried creating an XLS in the XLSTART folder to use as a template (tried
chainging Cell Format, etc.) but that doesn't seem to work. Maybe there's a
different method?

Thanks!
Irene
 
G

Guest

I renamed the csv file extension to txt and try to open it via excel it
prompted me for import menu.
 
D

Dave Peterson

Can you apply a custom format to those cells to show the leading 0's? (This is
after the import of the .CSV file.)

Another option. Rename that file to .txt. But record a macro when you open
that .txt file.

If you ever need to import a similar file with the same layout, you can just
play back that macro.

In fact, you can add headers/page setup/filters to make the macro more useful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top