3

I deal with barcodes in CSV files, and Excel likes to represent the numbers in scientific format, persisting through saves. It's very annoying, and I would rather not have to nurse the individual columns to ensure they don't convert under my eyes.

Is it possible to disable this scientific formation conversion, via the settings?

Giacomo1968
  • 58,727
Alex
  • 31

2 Answers2

4

Since your numbers are barcodes, they are not "really" numbers because you probably don't want to calculate with them.

Therefore, marking your cells (or the entire colums in your case) as text should work for you. Please note that this information will be lost if you save your spreadsheet as CSV again. As far as I know, this would be the least invasive approach.

Since you don't want to manipulate cells/colums, some bad news:

  1. Editing CSV file in Excel always converts number column to scientific notation
  2. Turn off scientific notation in Excel
  3. How can I stop Excel from eating my delicious CSV files and excreting useless data?

They all conclude, that it is not possible to do this by default, but 3. suggests to use a notation like ="12345678987654" in your CSV file which I checked to be working for Excel 2016

Number 1. cites a Microsoft Forum and suggests the utilisation of the Text Import Wizard:

Stop double-clicking the .TXT/.CSV file or opening the text file conventionally (e.g. CTRL+O) and use the Text Import Wizard to specify Text format for certain fields within your import file. Start by opening Excel to a blank workbook and from the Data tab's Get External Data group, click the From Text button.

After clicking From Text, select your text file from the Import Text File dialog and click Open. This launches the Text Import Wizard. There are three pages to complete. The first page is essentially to determine whether the file is to be considered Delimited or Fixed Width. The second page depends upon the first. You will be asked what characters to consider as delimiters or asked to choose the widths of a fixed width file.

The third page is what is going to help you determine the format of each field. Select your account id field from the Data preview at the bottom then select Text from the Column data format list in the upper left. Note that the header of the field in the bottom Data preview has changed to Text. Repeat for any other fields and click Finish in the lower right to complete your operation.

1

It appears this has finally been added as an option that can be disabled.

Under “File > Options > Data”, there's a section for “Automatic Data Conversion” and one of the check boxes is “Keep first 15 digits of long numbers and display in scientific notation.”

Uncheck that and it should stop this undesirable behavior.

Giacomo1968
  • 58,727