Closed
Description
版本:1.4.21
excel导出时,如果导出模型定义了ExporterHeader就会报错,这是反编译的报错的位置:
[AutoMap(typeof(Standard))]//这是automap的映射配置
[ExcelImporter(IsLabelingError = true)]//这个模型同时也用于导出模板
public class ImportExcelDto
{
public const int MaxLength = 1024;
/// <summary>
/// 规程类型
/// </summary>
[MaxLength(MaxLength)]
[Display(Name = "名称")]
[ExporterHeader("名称")]
public string Name { get; set; }
}
//导出文件
await exporter.Export("xxxx.xlsx", new List<ImportExcelDto>{new ImportExcelDto{Name="123"}});
如果模型没有定义ExporterHeader则不会报错
Metadata
Metadata
Assignees
Labels
No labels