C# Class Ywdsoft.Utility.Excel.ExcelImportHelper

Excel导入公共类
ファイルを表示 Open project: CrazyJson/TaskManager Class Usage Examples

Public Methods

Method Description
GetCellMsg ( object cellValue, string colName, int MaxLength, bool Required = false, bool isNChar = false ) : string

GetErrorExcel ( IWorkbook wb, string fileName ) : string

获取错误信息Excel

GetLength ( string str, int chinaLength = 2 ) : int

获取字符串长度。与string.Length不同的是,该方法将中文作 x 个字符计算。

ObjectIsNullOrEmpty ( object obj ) : bool

判断对象是否为空

Method Details

GetCellMsg() public static method

public static GetCellMsg ( object cellValue, string colName, int MaxLength, bool Required = false, bool isNChar = false ) : string
cellValue object
colName string
MaxLength int
Required bool
isNChar bool
return string

GetErrorExcel() public static method

获取错误信息Excel
public static GetErrorExcel ( IWorkbook wb, string fileName ) : string
wb IWorkbook excel对象
fileName string 文件名称
return string

GetLength() public static method

获取字符串长度。与string.Length不同的是,该方法将中文作 x 个字符计算。
public static GetLength ( string str, int chinaLength = 2 ) : int
str string 目标字符串
chinaLength int 中文作x个字符 默认为2个
return int

ObjectIsNullOrEmpty() public static method

判断对象是否为空
public static ObjectIsNullOrEmpty ( object obj ) : bool
obj object 待判断对象
return bool