When manipulating excel cells in C# (via an COM object), should I use the .Value or .Value2 ? that is
sheet.Cells[row + n, col].Value = "Hello world"
or
sheet.Cells[row + n, col].Value2 = "Hello world"
What is the difference between them to ?
Also, how do I set a cell format to "General" ?
sheet.Cells[row + n, col].NumberFormat = "XYZ"; // Not sure what should be here
Right now when I assign a cell with the number "0,34" and even if I do
sheet.Cells[row + n, col].NumberFormat = "@";
I get this "little error" sign up in the left corner in each cell