Search code examples
c#excelparsingnumericscientific-notation

Excel scientific notation converting numeric value to E+ characters


Excel scientific notation converting numeric value to E+ characters. How to handle this in excel parcing in c#? im expecting it as string value.for example my input is '123456789012345678901234567890' but excel automatically convert it to 1.23456789012345E+29.

im expecting it came as string value or need a solution to convert it to string in c#


Solution

  • I think you can use the below code snippet

    var exampleString ="1.23456789012345E+29";
    var result = BigInteger.Parse(exampleString, System.Globalization.NumberStyles.Any).ToString();
    

    Hope this will work for you..