mini-software / MiniExcel

Fast, Low-Memory, Easy Excel .NET helper to import/export/template spreadsheet (support Linux, Mac)
https://www.nuget.org/packages/MiniExcel/
Apache License 2.0
2.81k stars 343 forks source link

When opening the xlsx written by a reader containing Nan, it will prompt that there is a problem with the content. #690

Open yiyinghu97 opened 2 weeks ago

yiyinghu97 commented 2 weeks ago
static async Task Main(string[] args)
    {
        var path = Path.Combine("D:\\Document\\errorCSV", $"{Guid.NewGuid()}.xlsx");
        var table = new DataTable();
        {
            table.Columns.Add("Column1", typeof(double));
            table.Columns.Add("Column2", typeof(double));
            table.Rows.Add(1.0, double.NaN);
        }
        MiniExcel.SaveAs(path, table);