Avatar of morinia
morinia
Flag 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.
Statistical Analysis System (SAS)Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
morinia

8/22/2022 - Mon
Fabrice Lambert

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.

Solution:
Adjust the displayed format within Excel, the CSV is not at fault.
Roy Cox

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
ASKER CERTIFIED SOLUTION
byundt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
morinia

ASKER
Thanks to all.
Your help has saved me hundreds of hours of internet surfing.
fblack61