User-986267747 posted
Hi tinausa,
According to code snippet, it seems that the CellValue object cause the issue. I don’t know What is the type of the variable named newVal. If the type of the variable is DateTime, you could try to modify your code like below and check if it works
for you.
cl.CellValue = new CellValue(newVal.ToOADate().ToString());
for more information, please refer to:
http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2012/02/16/dates-in-spreadsheetml.aspx
I hope it is helpful to you.
Best regards,
Klein Zhang