Link to home
Start Free TrialLog in
Avatar of morinia
moriniaFlag for United States of America

asked on

Creating a CSV file from Excel maintaining numbers in character column

Creating a CSV file from Excel  and retaining the character format of a column that has all numeric

I have an excel spreadsheet that is defined as character, however the columns that have numeric are converting to scientific format.

The file looks fine when opened in notepad, however once opened in Excel the format changes.

The file was created in SAS Enterprise Guide.
Avatar of Fabrice Lambert
Fabrice Lambert
Flag of France image

When openning a CSV file, Excel attempt to guess the data type, and pick the most appropriate one, wich may not be the one you want.

Adjust the displayed format within Excel, the CSV is not at fault.
You need to open the file in Excel then format the number columns then save as csv file.

  1. Select the cells you want to modify. Selecting a cell range.
  2. Click the drop-down arrow next to the Number Format command on the Home tab. The Number Formatting drop-down menu will appear.
  3. Select the desired formatting option. ...
  4. The selected cells will change to the new formatting style.

For more details read this

How to control and understand settings in the Format Cells dialog box in Excel
Avatar of byundt
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of morinia


Thanks to all.