It seems there is an error with the date formatting.
I need to export this specific date to excel ("01/01/0001") but it didn't work for this date while the other date is working.
In my excel generated for the date "01/01/0001", it set me "-1".
Below my code
public byte[] ExportToExcel(IEnumerable exportData, string sheetName = "Sheet1")
{
using var memoryStream = new MemoryStream();
var mapper = new Mapper();
mapper.UseFormat(typeof(DateTime?), "dd/MM/yyyy");
mapper.UseFormat(typeof(DateTime), "dd/MM/yyyy");
mapper.Save(memoryStream, exportData, sheetName);
return memoryStream.ToArray();
}
Hi!
It seems there is an error with the date formatting. I need to export this specific date to excel ("01/01/0001") but it didn't work for this date while the other date is working. In my excel generated for the date "01/01/0001", it set me "-1".
Below my code
Thanks in advance!