Property | Type | Description | |
---|---|---|---|
MAX_COLUMN_WIDTH | int |
Method | Description | |
---|---|---|
Export ( |
生成EXECL文件,通过读取DataTable和列头映射信息
|
|
GetDataFromExcel ( Stream ins, ISheet &fSheet, int headRowIndex = 5 ) : |
从excel第一个sheet中读取数据
|
|
GetErrorCellStyle ( IWorkbook wb ) : ICellStyle |
获取数据行的错误信息提示样式
|
|
GetErrorHeadCellStyle ( IWorkbook wb ) : ICellStyle |
获取标题行的错误信息提示样式
|
|
GetFirstSheet ( string filePath ) : ISheet |
获取第一个Sheet
|
|
InitWorkBook ( Stream ins ) : IWorkbook |
通过输入流初始化workbook
|
|
SetHSSFValidation ( ISheet sheet, string textlist, int firstRow, int firstCol ) : ISheet |
设置某些列的值只能输入预制的数据,显示下拉框
|
|
SetHSSFValidation ( ISheet sheet, string textlist, int firstRow, int endRow, int firstCol, int endCol ) : ISheet |
设置某些列的值只能输入预制的数据,显示下拉框
|
|
SetTemplateErrorMsg ( ISheet sheet, int rowindex, string msg ) : void |
设置excel模版错误信息
|
Method | Description | |
---|---|---|
GetCellVale ( ICell cell ) : object |
获取单元格值
|
|
NumberToChar ( int number ) : string |
public static Export ( |
||
dt | 数据源 | |
ColumnInfoList | List |
列字段映射信息 |
return |
public static GetDataFromExcel ( Stream ins, ISheet &fSheet, int headRowIndex = 5 ) : |
||
ins | Stream | 输入流 |
fSheet | ISheet | 第一个sheet |
headRowIndex | int | 标题行索引 默认为第6行 |
return |
public static GetErrorCellStyle ( IWorkbook wb ) : ICellStyle | ||
wb | IWorkbook | |
return | ICellStyle |
public static GetErrorHeadCellStyle ( IWorkbook wb ) : ICellStyle | ||
wb | IWorkbook | |
return | ICellStyle |
public static GetFirstSheet ( string filePath ) : ISheet | ||
filePath | string | 文件路径 |
return | ISheet |
public static InitWorkBook ( Stream ins ) : IWorkbook | ||
ins | Stream | 输入流 |
return | IWorkbook |
public static SetHSSFValidation ( ISheet sheet, string textlist, int firstRow, int firstCol ) : ISheet | ||
sheet | ISheet | 要设置的sheet |
textlist | string | 下拉框显示的内容 |
firstRow | int | 开始行 |
firstCol | int | 开始列 |
return | ISheet |
public static SetHSSFValidation ( ISheet sheet, string textlist, int firstRow, int endRow, int firstCol, int endCol ) : ISheet | ||
sheet | ISheet | 要设置的sheet |
textlist | string | 下拉框显示的内容 |
firstRow | int | 开始行 |
endRow | int | 结束行 |
firstCol | int | 开始列 |
endCol | int | 结束列 |
return | ISheet |
public static SetTemplateErrorMsg ( ISheet sheet, int rowindex, string msg ) : void | ||
sheet | ISheet | 数据标签 |
rowindex | int | 错误信息显示行 |
msg | string | 错误信息 |
return | void |