Importing delimited text file - loading numeric as text

GDAS

New Member
Joined
Sep 18, 2006
Messages
2
I'm developing an extract from ERP system SAP, in the form of a csv file which can then be imported into Excel for manipulation. One of the fields in the csv file is made up of numeric characters, but sometimes has leading zeros which I want to keep when imported in Excel. However, when I open the csv file in Excel, a value such as 001 is treated as numeric and becomes 1. I have tried inserting a single quote in front in the csv file, i.e. '001 but then Excel treats the quote as part of the text field, unlike the situation where you type '001 directly into the worksheet.

Any ideas?

thanks,

Graham
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Try changing the file extension from csv to txt, then specifying Text as the format for that column at step 3 of the Text Import Wizard.
 
Upvote 0
thanks Andrew. Your proposal works perfectly. This was my first posting on Mr Excel, the site came highly recommended by a friend, and I can clearly see why!

Graham
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,840
Members
449,096
Latest member
Erald

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