Opening CSV Files

E

emericklaw

Every week I receive a CSV file with a list of bank details and a name.

They are in the following format:
ID,SortCode,AccountNumber,Name

Examples:
435,22-22-15,3498632,John Smith
100,02-12-05,0342345,Joe Blogs

When opening this file in excel the first example will import fine bu
the second one gets changed by excel. It converts the 02-12-05 to dat
format and drops the leading 0 on the next field.

This causes problems when saving the CSV file again because the sor
codes saved as dates are totally wrong and the account number is to
short.

Is there a way of opening the file and getting excel not to do it
'magic' on the data?

Any help appreciated!

Mat
 
D

Dave Peterson

If you rename the .csv file to .txt, you can open excel and then do File|open.

You'll be prompted to specify the type of file (you'll choose delimited) and
then delimited by a comma.

Then you'll get to a step that asks for the format of each field. You can
choose text for each of these two fields. (Or you could choose General for the
0342345 field and custom format it as 0000000 after you finish the import.)
 

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