类的使用
gu.sql2java.excel.config.SheetConfig
使用SheetConfig的程序包
-
gu.sql2java.excel中SheetConfig的使用
声明为SheetConfig的gu.sql2java.excel中的字段返回SheetConfig的gu.sql2java.excel中的方法修饰符和类型方法说明BaseExcelReader.getSheetConfig()ExcelGenerator.getSheetConfig()ExcelGenerator.getSheetConfig(int index) ExcelReader.getSheetConfig()IExcelReader.getSheetConfig()SheetGenerator.getSheetConfig()返回Excel表输出配置(SheetConfig)实例,可以通过此实例修改输出配置参数类型为SheetConfig的gu.sql2java.excel中的方法修饰符和类型方法说明ExcelReader.configSheet(SheetConfig sheetConfig, int index) 为指定索引设置工作薄解析配置ExcelReader.configSheet(SheetConfig sheetConfig, Consumer<?> beanConsumer, int index) 为指定索引设置工作薄解析配置ExcelReader.configSheet(SheetConfig sheetConfig, List<?> rows, Consumer<?> beanConsumer, int index) 为指定索引设置工作薄解析配置voidBaseExcelReader.setSheetConfig(SheetConfig sheetConfig) ExcelGenerator.setSheetConfig(int index, SheetConfig sheetConfig) 设置索引指定SheetGenerator的输出配置(SheetConfig)实例,索引越界则忽略ExcelGenerator.setSheetConfig(SheetConfig sheetConfig) 设置第一个SheetGenerator的输出配置(SheetConfig)实例, 实例不存在则忽略voidExcelReader.setSheetConfig(SheetConfig sheetConfig) voidIExcelReader.setSheetConfig(SheetConfig sheetConfig) SheetGenerator.setSheetConfig(SheetConfig sheetConfig) 参数类型为SheetConfig的gu.sql2java.excel中的构造器限定符构造器说明BaseExcelReader(SheetConfig sheetConfig) BaseExcelReader(SheetConfig sheetConfig, Consumer<?> beanConsumer) BaseExcelReader(SheetConfig sheetConfig, List<?> rows, Consumer<?> beanConsumer) CSVReader(SheetConfig sheetConfig) CSVReader(SheetConfig sheetConfig, Consumer<?> beanConsumer) CSVReader(SheetConfig sheetConfig, List<?> rows, Consumer<?> beanConsumer) ExcelReader(SheetConfig sheetConfig) ExcelReader(SheetConfig sheetConfig, Consumer<?> beanConsumer) 构造方法 创建第一个工作薄配置ExcelReader(SheetConfig sheetConfig, List<?> rows, Consumer<?> beanConsumer) 构造方法 创建第一个工作薄配置SheetReader(SheetConfig sheetConfig) SheetReader(SheetConfig sheetConfig, Consumer<?> beanConsumer) SheetReader(SheetConfig sheetConfig, List<?> rows, Consumer<?> beanConsumer) -
gu.sql2java.excel.aspect.spring中SheetConfig的使用
修饰符和类型方法说明static SheetConfigExcelHelperAround.getSheetconfig()返回为Spring AOP处理当前Excel导出的Excel配置对象修饰符和类型方法说明static voidExcelHelperAround.setSheetconfig(SheetConfig sheetConfig) (非强制)为Spring AOP处理当前Excel导出指定的Excel配置对象static voidExcelHelperAround.setSheetconfig(SheetConfig sheetConfig, boolean force) 为Spring AOP处理当前Excel导出指定的Excel配置对象 -
gu.sql2java.excel.config中SheetConfig的使用
修饰符和类型方法说明SheetConfig.addColumns(PropertyConfig... elements) SheetConfig.addColumns(Iterable<PropertyConfig> elements) SheetConfig.addNestedColumn(String nestedName, String descName) SheetConfig.addNestedColumns(Iterable<String> elements) SheetConfig.addNestedColumns(String... elements) SheetConfig.merge(SheetConfig other) 将输入的Excel表配置与当前对象的合并
将other中有定义的Excel Sheet配置字段复制到当前对象的对应字段
将other定义的Excel Column配置对象(PropertyConfig)合并到当前的Column配置对象中,如果存在相同的对象,则以other的为准,
如果other.beanClass不为null则复制到当前对象的同名字段SheetConfig.setColumnConfigs(Iterable<PropertyConfig> columnConfigs) SheetConfig.setDateFormat(String dateFormat) SheetConfig.setDateTimeFormat(String dateTimeFormat) SheetConfig.setDefaultIncludeColumns(Set<String> defaultIncludeColumns) SheetConfig.setDefaultValue(String defaultValue) SheetConfig.setExcludeColumns(Iterable<String> excludeColumns) 指定输出时要排序的字段(黑名单),在此名单中的字段不被输出SheetConfig.setExcludeColumns(String... excludeColumns) SheetConfig.setExcludeColumns(Set<String> excludeColumns) SheetConfig.setFileNamePrefix(String fileNamePrefix) SheetConfig.setFillColor(String fillColor) SheetConfig.setFillColor(org.apache.poi.ss.usermodel.IndexedColors fillColor) SheetConfig.setFirstBold(boolean firstBold) SheetConfig.setFirstBold(Boolean firstBold) SheetConfig.setFontColor(String fontColor) SheetConfig.setFontColor(org.apache.poi.ss.usermodel.IndexedColors fontColor) SheetConfig.setFontHeight(short fontHeight) SheetConfig.setFontHeight(Integer fontHeight) SheetConfig.setFontName(String fontName) SheetConfig.setHeaderFillColor(String headerFillColor) SheetConfig.setHeaderFillColor(org.apache.poi.ss.usermodel.IndexedColors headerFillColor) SheetConfig.setHeaderFontColor(String headerFontColor) SheetConfig.setHeaderFontColor(org.apache.poi.ss.usermodel.IndexedColors headerFontColor) SheetConfig.setHeaderFontHeight(short headerFontHeight) SheetConfig.setHeaderFontHeight(Integer headerFontHeight) SheetConfig.setHeaderFontName(String headerFontName) SheetConfig.setHeaderHorizontalAlign(String headerHorizontalAlign) SheetConfig.setHeaderHorizontalAlign(org.apache.poi.ss.usermodel.HorizontalAlignment headerHorizontalAlign) SheetConfig.setHideColumns(Iterable<String> hideColumns) SheetConfig.setHideColumns(String... hideColumns) SheetConfig.setHideColumns(Set<String> hideColumns) SheetConfig.setHorizontalAlign(String horizontalAlign) SheetConfig.setHorizontalAlign(org.apache.poi.ss.usermodel.HorizontalAlignment horizontalAlign) SheetConfig.setIncludeColumns(Iterable<String> includeColumns) 指定要输出的字段(白名单),在此名单中的字段才会被输出, 此方法也定义了字段输出顺序,SheetConfig.setIncludeColumns(String... includeColumns) SheetConfig.setIncludeColumns(Set<String> includeColumns) SheetConfig.setIncludeColumnsOrDefault(Iterable<String> includeColumns) 指定要输出的字段(白名单),如果输入参数为null或空,则使用getDefaultExportColumnNames()的返回值SheetConfig.setIntegralFormat(String integralFormat) SheetConfig.setMaxHeight(int maxHeight) SheetConfig.setMaxHeight(Integer maxHeight) SheetConfig.setMaxWidth(int maxWidth) SheetConfig.setMaxWidth(Integer maxWidth) SheetConfig.setRoundingMode(int roundingMode) SheetConfig.setScale(int scale) SheetConfig.setSheetName(String sheetName) SheetConfig.setTimeFormat(String timeFormat) SheetConfig.setTimestampFormat(String timestampFormat) SheetConfig.setTitleFillColor(String titleFillColor) SheetConfig.setTitleFillColor(org.apache.poi.ss.usermodel.IndexedColors titleFillColor) SheetConfig.setTitleFontColor(String titleFontColor) SheetConfig.setTitleFontColor(org.apache.poi.ss.usermodel.IndexedColors titleFontColor) SheetConfig.setTitleFontHeight(short titleFontHeight) SheetConfig.setTitleFontHeight(Integer titleFontHeight) SheetConfig.setTitleFontName(String titleFontName) SheetConfig.setTitleHorizontalAlign(String titleHorizontalAlign) SheetConfig.setTitleHorizontalAlign(org.apache.poi.ss.usermodel.HorizontalAlignment titleHorizontalAlign) 参数类型为SheetConfig的gu.sql2java.excel.config中的方法修饰符和类型方法说明SheetConfig.merge(SheetConfig other) 将输入的Excel表配置与当前对象的合并
将other中有定义的Excel Sheet配置字段复制到当前对象的对应字段
将other定义的Excel Column配置对象(PropertyConfig)合并到当前的Column配置对象中,如果存在相同的对象,则以other的为准,
如果other.beanClass不为null则复制到当前对象的同名字段voidExcelPropertyConfig.setParent(SheetConfig parentConfig) voidPropertyConfig.setParent(SheetConfig parentConfig) 设置所属的Excel表输出全局配置