C# Accessing EXCEL, formatting cell as General
问题 C#, Visual studio 2010 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]