123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- using NPOI.SS.UserModel;
- namespace YBEE.EQM.Application;
- /// <summary>
- /// 导出 Excel 定义
- /// </summary>
- public class ExportExcelDto<T>
- {
- /// <summary>
- /// 是否XLSX格式
- /// </summary>
- public bool IsXlsx { get; set; } = true;
- /// <summary>
- /// 工作表名称
- /// </summary>
- public string SheetName { get; set; } = "Sheet1";
- /// <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;
- /// <summary>
- /// 不设置行高
- /// </summary>
- public bool NotSetRowHeight { get; set; } = false;
- }
|