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

使用@group标签模板,SaveAsByTemplate方法抛出空指针异常 #665

Open nelson820125 opened 3 months ago

nelson820125 commented 3 months ago

Excel Type

Upload Excel File

Please attach your issue file by dragging or droppng, selecting or pasting them.

下面这个文件的代码存在异常,下载源码使用@group标签的模板,然后导入List<>对象,抛出了空指针异常 fb567c598b49a3fd40641c9a343ca86

MiniExcel Version

1.34.1

Description

这里这个IList为空,导致异常

nelson820125 commented 3 months ago

类:ExcelOpenXmlTemplate 方法:private void WriteSheetXml(Stream stream, XmlDocument doc, XmlNode sheetData, bool mergeCells = false)