I have a csv file which I have to import into data base. When reading the file by stream reader, some values are converted into scientific notation like "5.00E+11". I have to restore this into original values. This is being done by a job, so I can not format the cell to "text" or "special" manually. When that cell is formatted as "text" or "special" it is working fine.
I need result as follows :
"5.00E+11" should be converted into "500000000000"
"8.12E+12" should be converted into "8122280000000"
My code for reading the file is as below:
/// <summary>
/// This is used to read the csv file
/// </summary>
using (StreamReader reader = new StreamReader(comepleteFilePath))
{
values = reader.ReadToEnd()
.Split(new string[]
{ Environment.NewLine },
StringSplitOptions.RemoveEmptyEntries
).ToList();
}
var _tempNuber = Convert.ToString(splits[13].Trim());
like below