CSV file

spg2112

Active Member
Joined
Feb 27, 2002
Messages
316
Hello all,

I have a CSV file that has to have the following format in one of the columns:

001004
001204
003205

Where a 4 digit account code is always preceded by 2 0's. However when I close the file and re-open, the 2 0's are always gone. I tried formatting the columns as text already. Any ideas?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
Change the file extension to .txt and open the file using Excel's File | Open... menu command. In doing so the Text to Columns wizard will be invoked. Set the column format for the column containing these values to Text.
 

parry

MrExcel MVP
Joined
Aug 20, 2002
Messages
3,355
This is from Excel 97 help...

Formatting and features not transferred in file conversions

The Microsoft Excel 97 Workbook file format preserves all worksheet and chart data, formatting, macros, and other features available in Microsoft Excel 97. If you save a Microsoft Excel workbook in another file format, the formatting, data, and other features may be lost.

Is there a reason why you want to retain the CSv format? Saving in XLS format will give you greater flexibility and you could always save as CSV again if you want to interact with some other application that required that format.
 

Forum statistics

Threads
1,144,765
Messages
5,726,175
Members
422,660
Latest member
mrsteele

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
Top