I need to write some long integer to csv file with C# (vs2010), for example, the number is 33333333333333333, but when I open the csv file with excel, what I see is like this: 3.33333E+16, I don't want this effect, I just want to see the number in text format when open it in Excel.
my code is like below:
var csv = new StringBuilder();
var filePath = "c:\\zzx\\test.csv";
long a = 222222222222222222L;
long b = 33333333333333333L;
var newLine = string.Format("'{0},\"{1}\"", a, b);
csv.AppendLine(newLine);
File.WriteAllText(filePath, csv.ToString());
can anyone help me solve this issue?