using NPOI.SS.UserModel; namespace YBEE.EQM.Application; /// /// 导出单元格样式 /// public class ExportExcelCellStyle { public IDataFormat DataFormat { get; set; } /// /// 标题字段 /// public string TitleFontName { get; set; } = "黑体"; /// /// 常规字段 /// public string FontName { get; set; } = "宋体"; /// /// 百分比 /// public ICellStyle PercentCellStyleP2 { get; set; } /// /// 数字两位小数 /// public ICellStyle NumberCellStyleP2 { get; set; } /// /// 数字四位小数 /// public ICellStyle NumberCellStyleP4 { get; set; } /// /// 标题样式 /// public ICellStyle TitleStyle { get; set; } /// /// 摘要样式 /// public ICellStyle SummaryStyle { get; set; } /// /// 列头样式 /// public ICellStyle ColumnHeaderStyle { get; set; } /// /// 带背景列头样式 /// public ICellStyle ColumnFillHeaderStyle { get; set; } /// /// 居中对齐 /// public ICellStyle CenterCellStyle { get; set; } /// /// 居左对齐 /// public ICellStyle LeftCellStyle { get; set; } /// /// 居右对齐 /// public ICellStyle RightCellStyle { get; set; } /// /// 居中对齐(自动换行) /// public ICellStyle CenterWrapCellStyle { get; set; } /// /// 居左对齐(自动换行) /// public ICellStyle LeftWrapCellStyle { get; set; } /// /// 居右对齐(自动换行) /// public ICellStyle RightWrapCellStyle { get; set; } /// /// 填充样式 /// public ICellStyle FillCellStyle { get; set; } /// /// 默认标题高度 /// public static readonly short DefaultTitleHeight = 50 * 20; /// /// 默认行高 /// public static readonly short DefaultRowHeight = 15 * 20; }