Monday, September 24, 2018

Long Numeric Fields get Converted to a Scientific Value when CSV file is Opened in Excel

Long numeric field values in a CSV file are imported incorrectly as these values get converted to scientific value.

The user would like to import a CSV file with a field that is of long numeric field type (means that this field is composed of large integer numbers ie. the UPC code for items can be composed of as much as 15-digits).

The user imports the file and the value in the long number field got converted from 'Number' format (ie 214578963256984) to Scientific' (ie 2.14579E+14).

1. Open the file in Excel

2. Highlight the cells that contains the Long numeric value

3. Right-click mouse > click Format cells

4. Select Number

Note: Microsoft automatically converts this so if a CSV file with a long number field/column needs editing prior to import, always make sure that the data format of the long number field/column is changed to Number. To avoid this, the user can also edit the CSV file using Notepad instead.

No comments:

Post a Comment