0

I have a csv file with a column where the integers are over 16 characters long. The issue with this is that it changes the integer to a short abbreviation example: 8.71688E+17, is there a way in c# you can convert it back to a long integer without having to modify the csv file itself?

I currently convert the CSV file to a datatable, could there be a way at the conversion stage?

Mark W
  • 85
  • 2
  • 11
  • These may help you.. http://stackoverflow.com/questions/3879463/parse-a-number-from-exponential-notation http://stackoverflow.com/questions/4723537/converting-exponential-number-to-decimal-1-11111117e9-trailing-digits-become – Sen Jacob Oct 04 '12 at 08:03

2 Answers2

0

You can use BitInteger class. Here's more info: http://www.codeproject.com/Articles/2728/C-BigInteger-Class

Nickon
  • 9,652
  • 12
  • 64
  • 119
0

prefix value with '=' and enclose large-value inside double quote so final string to put into excel cell is ="<large-value>"

rt2800
  • 3,045
  • 2
  • 19
  • 26