importing csv

G

Guest

I periodically import .cvs files that contain data like

0000
00
00000
0

at various places in the file. I need to capture the correct characters in
Excel. Because Excel insists on dropping leading zeros, I am forced to
rename the file as .txt before opening it. I can then tell the import wizard
to treat the data as text.

Is there a better way?
 
D

Dave Peterson

This seems like the easiest way to me.

Well, if the files that you import all have the same layout, you could record a
macro that imports the data. The macro would still specify the fields the way
you like them.

You could even add headers/footers/print settings/filters/etc to your macro.

Then just run that macro when you need to import that data.

(Yes, you'd still have to rename the file to .txt, though.)
 
G

Guest

Thank you
--
Gary's Student


Dave Peterson said:
This seems like the easiest way to me.

Well, if the files that you import all have the same layout, you could record a
macro that imports the data. The macro would still specify the fields the way
you like them.

You could even add headers/footers/print settings/filters/etc to your macro.

Then just run that macro when you need to import that data.

(Yes, you'd still have to rename the file to .txt, though.)
 

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