12345678910111213141516171819202122232425262728293031323334353637383940 |
- using NPOI.SS.UserModel;
- namespace YBEE.EQM.Application;
- /// <summary>
- /// EXCEL导出服务
- /// </summary>
- public interface IExportExcelService
- {
- /// <summary>
- /// 导出 Excel 文件
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="input"></param>
- /// <returns></returns>
- byte[] ExportExcel<T>(ExportExcelDto<T> input);
- /// <summary>
- /// 获取单元格表头和单元格样式
- /// </summary>
- /// <param name="wb"></param>
- /// <param name="fontSize"></param>
- /// <param name="titleFontSize"></param>
- /// <returns></returns>
- ExportExcelCellStyle GetCellStyle(IWorkbook wb, double fontSize = 10, double titleFontSize = 16);
- /// <summary>
- /// 添加单元格
- /// </summary>
- /// <param name="value"></param>
- /// <param name="row"></param>
- /// <param name="columnIndex"></param>
- /// <param name="cellStyle"></param>
- /// <param name="sheet"></param>
- /// <param name="width"></param>
- /// <param name="zeroToBlank">0转为空白</param>
- /// <param name="cellType"></param>
- ICell AddCell(object value, IRow row, int columnIndex, ICellStyle cellStyle, ISheet sheet = null, int? width = null, bool? zeroToBlank = false, CellType? cellType = null);
- }
|