using System.Linq.Expressions; using System.Reflection; namespace XYY.Core.Standard.ExcelHelper.MSExcelHelper { public class ExcelMappingItem { /// /// 列名 /// public string ColumnName { get; set; } public ExcelMappingItem Name(string name) { this.ColumnName = name; return this; } public string ColumnAnnotation { get; set; } public ExcelMappingItem Annotation(string annotation) { this.ColumnAnnotation = annotation; return this; } public PropertyInfo PropertyInfo { get; set; } /// /// 列名表达式 /// public LambdaExpression LambdaExpression { get; set; } /// /// 列宽,默认使用该列文本值的最长宽度。 /// 限制最长宽度为50个字符。 /// public int ColumnWidht { get; set; } public ExcelMappingItem Width(int width) { this.ColumnWidht = width; return this; } /// /// 格式化文本 /// public string ColumnFormattext { get; set; } public ExcelMappingItem Formattext(string text) { this.ColumnFormattext = text; return this; } } }