Hello,
I'd like to keep the cell value as input exactly. For example, when I set the value "01", I do not want it to be changed as "1" or "1.00". I tried to set the NumberFormat to "@" but it does not work. The NumberFormat was changed to "0.00" after the Value was set. And the value changed to "1.00". Sample code is below:
var workbook = new Workbook();
workbook.LoadFromFile("test1.xlsx");
var sheet = workbook.Worksheets[0];
sheet.Range[1, 1].NumberFormat = "@"; //I'd like to keep the text
sheet.Range[1, 1].Value = "01";
Console.WriteLine(sheet.Range[1, 1].NumberFormat);
workbook.SaveToFile("ntest1.xlsx");
Console.ReadKey();
Regards
Lei