1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using NPOI.SS.UserModel;
- namespace YBEE.EQM.Application;
- /// <summary>
- /// 导出 Excel 定义
- /// </summary>
- public class ExportExcelDto<T>
- {
- /// <summary>
- /// 文件名
- /// </summary>
- public string FileName { get; set; }
- /// <summary>
- /// 标题
- /// </summary>
- public string Title { get; set; }
- /// <summary>
- /// 标题高度
- /// </summary>
- public short? TitleHeight { get; set; }
- /// <summary>
- /// 行高
- /// </summary>
- public short? RowHeight { get; set; }
- /// <summary>
- /// 列头高度
- /// </summary>
- public short? ColumnHeaderHeight { get; set; }
- /// <summary>
- /// 包含导出时间
- /// </summary>
- public bool IncludeExportTime { get; set; } = true;
- /// <summary>
- /// 摘要
- /// </summary>
- public string Summary { get; set; } = "";
- /// <summary>
- /// 列定义
- /// </summary>
- public List<ExportExcelColDto<T>> Columns { get; set; }
- /// <summary>
- /// 数据行
- /// </summary>
- public List<T> Items { get; set; }
- /// <summary>
- /// 自定义概要
- /// </summary>
- public Func<ISheet, ExportExcelCellStyle, int, int> BuildSummary { get; set; }
- /// <summary>
- /// 设置Sheet属性
- /// </summary>
- public Action<ISheet> SetSheet { get; set; }
- /// <summary>
- /// 字体大小
- /// </summary>
- public double FontSize { get; set; } = 10;
- /// <summary>
- /// 标题字体大小
- /// </summary>
- public double TitleFontSize { get; set; } = 16;
- /// <summary>
- /// 表头行高
- /// </summary>
- public short HeaderHeight { get; set; } = ExportExcelCellStyle.DefaultRowHeight;
- }
|