93 lines
2.4 KiB
C#
93 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MyCode.Project.Infrastructure.Exports
|
|
{
|
|
/// <summary>
|
|
/// 电子表格的表头设置(支持多行表头设置)
|
|
/// </summary>
|
|
public class NpoiHeadCfg
|
|
{
|
|
|
|
/// <summary>
|
|
/// 表头格式设置(支持多行表头)
|
|
/// </summary>
|
|
public NpoiHeadCfg()
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 重载构造函数
|
|
/// </summary>
|
|
/// <param name="FieldName">数据源列名</param>
|
|
/// <param name="FieldLable">电子表格列名</param>
|
|
/// <param name="Height">行高</param>
|
|
/// <param name="Width">列宽</param>
|
|
public NpoiHeadCfg(string FieldName, string FieldLable, int Width = 10, int Height = 13)
|
|
{
|
|
|
|
this.FieldName = FieldName;
|
|
this.FieldLable = FieldLable;
|
|
this.Height = Height;
|
|
this.Width = Width;
|
|
this.IsBold = true;
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 字段名称
|
|
/// </summary>
|
|
public string FieldName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 字段标签(表格行头标题)
|
|
/// </summary>
|
|
public string FieldLable { get; set; }
|
|
/// <summary>
|
|
/// 高度
|
|
/// </summary>
|
|
public int Height { get; set; }
|
|
/// <summary>
|
|
/// 宽度
|
|
/// </summary>
|
|
public int Width { get; set; }
|
|
/// <summary>
|
|
/// 背景颜色
|
|
/// </summary>
|
|
public string BackColor { get; set; }
|
|
|
|
/// <summary>
|
|
/// 文本颜色
|
|
/// </summary>
|
|
public string FontColor { get; set; }
|
|
/// <summary>
|
|
/// 是否粗体显示
|
|
/// </summary>
|
|
public bool IsBold { get; set; }
|
|
|
|
/// <summary>
|
|
/// 开始列索引,从0开始
|
|
/// </summary>
|
|
public int StartColIndex { get; set; }
|
|
/// <summary>
|
|
/// 开始行索引,从0开始
|
|
/// </summary>
|
|
public int StartRowIndex { get; set; }
|
|
/// <summary>
|
|
/// 结束列索引,0则与startColIndex相等
|
|
/// </summary>
|
|
public int EndColIndex { get; set; }
|
|
/// <summary>
|
|
/// 结束行索引,0则与startRowIndex相等
|
|
/// </summary>
|
|
public int EndRowIndex { get; set; }
|
|
|
|
|
|
|
|
}
|
|
}
|