首页 > 代码库 > Excel scientific notation issue

Excel scientific notation issue

??

This is a known issue, you can find more in internet.

Excel will treat text(can display with number) more than 11 numbers, it will convert to scientific notation display.

It is not an issue now, but if your text content length is more than 15, the issue occurs, it will discard the value and

Set default is zero.

So if your number is 1234567891012345, excel will convert to 1234567891012340 if your display back from scientific notation.

Scenario, we dump table content to csv file, when we open the csv file with excel, we find one column display as scientific notation, this is not what we want.

Another one is , one column we contact some value like 123,125,4566,…, excel take this text as number just like we apply a custom format on number, scientific notation occurs again and some values miss in excel

Solution:

When we dump data from oracle or sqlserver to csv, we should add single quote .

Select ‘‘‘‘ || column from table;

Excel will take this column as text. And not display the single quote before value. It is useful.

Even in the data filter.

??

??

Excel scientific notation issue