Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is this value means 1.845E-07 in excel?

I am reading the excel sheet from C# by using interop services. My sheet has one of cell value as 0.00. but run time when I am checking the value of that cell in C# code I am getting "1.845E-07" this value. When I check in excel sheet, on that cell right clicked , say format cell I got "1.845E-07" value in sample section. How to get exact value? Please help me. The code is huge, so I can't provide it here. that line is:

if (Convert.ToString(((Excel.Range)worksheet.Cells[iRowindex, colIndex_q10]).Value2) != string.Empty)
{
    drRow[dtSourceEXLData.Columns[constants.Floor]] = ((Excel.Range)worksheet.Cells[iRowindex, colIndex_q10]).Value2.ToString();
}

Same problem with Date cells "39448". what does this means??please help....

like image 322
Red Swan Avatar asked May 05 '10 11:05

Red Swan


People also ask

What does !$ A :$ A mean in Excel?

A:A just means that you refer to another spreadsheet in your workbook -> say you currently work in Sheet2 and want to get Data from Sheet1. for this you have to use Sheet1 ! A:A.

What does E 05 in Excel mean?

Prism switches to scientific notation when the values are very large or very small. For example: 2.3e-5, means 2.3 times ten to the minus five power, or 0.000023.

What does E$ mean in Excel?

Display numbers in scientific (exponential) notation.


1 Answers

1.84E-07 is the exact value, represented using scientific notation, also known as exponential notation.

1.845E-07 is the same as 0.0000001845. Excel will display a number very close to 0 as 0, unless you modify the formatting of the cell to display more decimals.

C# however will get the actual value from the cell. The ToString method use the e-notation when converting small numbers to a string.

You can specify a format string if you don't want to use the e-notation.

like image 120
Kjetil Watnedal Avatar answered Sep 27 '22 22:09

Kjetil Watnedal