| 限定符和类型 | 方法和说明 |
|---|---|
static void |
cellStyle(org.apache.poi.ss.usermodel.CellStyle cellStyle)
默认单元格样式
|
static java.lang.Object |
convertValueByDestCell(org.apache.poi.ss.usermodel.Cell destCell,
java.lang.Object value)
根据目标单元格类型转换值
|
static void |
copyCell(ExcelTemplate excel,
org.apache.poi.ss.usermodel.Cell srcCell,
org.apache.poi.ss.usermodel.Cell destCell)
拷贝单元格
|
static void |
copyCell(ExcelTemplate excel,
org.apache.poi.ss.usermodel.Cell srcCell,
org.apache.poi.ss.usermodel.Cell destCell,
boolean copyValue,
boolean copyStyle,
boolean copyCellComment)
拷贝单元格
|
static void |
copyCellStyle(org.apache.poi.ss.usermodel.CellStyle srcStyle,
org.apache.poi.ss.usermodel.CellStyle destStyle)
复制一个单元格样式到目的单元格样式
|
static void |
font(org.apache.poi.ss.usermodel.Font font)
默认字体样式
|
static org.apache.poi.ss.util.CellRangeAddress |
getMergedRegion(org.apache.poi.ss.usermodel.Sheet sheet,
int row,
int col,
ConstantForEnum.MergedRegionStatus mergedRegionStatus)
获取合并单元格对象
|
static int |
getMergedRegionIndex(org.apache.poi.ss.usermodel.Sheet sheet,
int row,
int col)
获取合并单元格对象索引
|
static void |
insertColumns(ExcelTemplate excel,
org.apache.poi.ss.usermodel.Sheet sheet,
int startRow,
int columns,
boolean copyValue)
插入单元格
|
static void |
insertRows(ExcelTemplate excel,
org.apache.poi.ss.usermodel.Sheet sheet,
int startRow,
int rows)
插入单元格
|
static void |
insertRows(ExcelTemplate excel,
org.apache.poi.ss.usermodel.Sheet sheet,
int startRow,
int rows,
boolean copyValue)
插入单元格
|
static void |
mergerRegion(org.apache.poi.ss.usermodel.Sheet sheet,
int firstR,
int lastR,
int firstC,
int lastC)
合并单元格
|
static void |
mergerRegion(org.apache.poi.ss.usermodel.Sheet fromSheet,
org.apache.poi.ss.usermodel.Sheet toSheet)
复制原有sheet的合并单元格到新创建的sheet
|
static DatasKeySheets |
readExcel(Excel excel)
已过时。
|
static DatasKeySheets |
readExcel(Excel excel,
ExcelI excelI)
已过时。
|
static void |
rowExcel(org.apache.poi.ss.usermodel.Row row,
int rowIndex)
默认行样式
|
static void |
setCellValue(org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Row row,
org.apache.poi.ss.usermodel.Cell cell,
int rowIndex,
int colIndex,
java.lang.Object value)
格式化值
|
static void |
setCellValue(org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Row row,
org.apache.poi.ss.usermodel.Cell cell,
int rowIndex,
int colIndex,
java.lang.Object value,
java.lang.String partten)
格式化值
|
static void |
writeExcel(java.util.List<SheetDatas> sheetDatas,
Excel excel)
已过时。
|
static void |
writeExcel(java.util.List<SheetDatas> sheetDatas,
Excel excel,
ExcelI excelI)
已过时。
|
@Deprecated public static final void writeExcel(java.util.List<SheetDatas> sheetDatas, Excel excel) throws java.lang.Exception
sheetDatas - 所有行列数据对象excel - excel对象java.lang.ExceptionExcelRWUtil.writeExcel(List, Excel)@Deprecated public static final void writeExcel(java.util.List<SheetDatas> sheetDatas, Excel excel, ExcelI excelI) throws java.lang.Exception
sheetDatas - 数据集合excel - 对象excelI - 接口java.lang.ExceptionExcelRWUtil.writeExcel(List, Excel, ExcelI)public static final void rowExcel(org.apache.poi.ss.usermodel.Row row,
int rowIndex)
cellStyle - public static final void cellStyle(org.apache.poi.ss.usermodel.CellStyle cellStyle)
cellStyle - public static final void font(org.apache.poi.ss.usermodel.Font font)
cellStyle - @Deprecated public static final DatasKeySheets readExcel(Excel excel) throws java.lang.Exception
excel - excel对象java.lang.Exception@Deprecated public static final DatasKeySheets readExcel(Excel excel, ExcelI excelI) throws java.lang.Exception
excel - excel对象excelI - excelI接口java.lang.Exceptionpublic static final void mergerRegion(org.apache.poi.ss.usermodel.Sheet sheet,
int firstR,
int lastR,
int firstC,
int lastC)
sheet - firstR - 开始行lastR - 结束行firstC - 开始列lastC - 结束列public static final void mergerRegion(org.apache.poi.ss.usermodel.Sheet fromSheet,
org.apache.poi.ss.usermodel.Sheet toSheet)
sheetCreat - 新创建sheetsheet - 原有的sheetpublic static final void copyCellStyle(org.apache.poi.ss.usermodel.CellStyle srcStyle,
org.apache.poi.ss.usermodel.CellStyle destStyle)
srcStyle - 源样式destStyle - 目标样式public static final void copyCell(ExcelTemplate excel, org.apache.poi.ss.usermodel.Cell srcCell, org.apache.poi.ss.usermodel.Cell destCell)
srcCell - 源单元格destCell - 目标单元格public static final java.lang.Object convertValueByDestCell(org.apache.poi.ss.usermodel.Cell destCell,
java.lang.Object value)
destCell - 目标单元格value - 待转换的值public static final void copyCell(ExcelTemplate excel, org.apache.poi.ss.usermodel.Cell srcCell, org.apache.poi.ss.usermodel.Cell destCell, boolean copyValue, boolean copyStyle, boolean copyCellComment)
srcCell - 源单元格destCell - 目标单元格copyStyle - 是否拷贝样式copyValue - 是否拷贝内容copyCellComment - 是否拷贝评论public static final void setCellValue(org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Row row,
org.apache.poi.ss.usermodel.Cell cell,
int rowIndex,
int colIndex,
java.lang.Object value)
sheet - 对象row - 行对象cell - 列对象rowIndex - 行索引colIndex - 列索引value - 值public static final void setCellValue(org.apache.poi.ss.usermodel.Sheet sheet,
org.apache.poi.ss.usermodel.Row row,
org.apache.poi.ss.usermodel.Cell cell,
int rowIndex,
int colIndex,
java.lang.Object value,
java.lang.String partten)
sheet - 对象row - 行对象cell - 列对象rowIndex - 行索引colIndex - 列索引value - 值partten - 格式化日期:yyyy-MM-dd HH:mm:sspublic static final void insertRows(ExcelTemplate excel, org.apache.poi.ss.usermodel.Sheet sheet, int startRow, int rows)
sheet - sheet对象startRow - 开始行号,从0开始rows - 插入行数public static final void insertColumns(ExcelTemplate excel, org.apache.poi.ss.usermodel.Sheet sheet, int startRow, int columns, boolean copyValue)
sheet - sheet对象startRow - 开始行号,从0开始rows - 插入列数public static final void insertRows(ExcelTemplate excel, org.apache.poi.ss.usermodel.Sheet sheet, int startRow, int rows, boolean copyValue)
sheet - sheet对象startRow - 开始行号,从0开始rows - 插入行数public static final org.apache.poi.ss.util.CellRangeAddress getMergedRegion(org.apache.poi.ss.usermodel.Sheet sheet,
int row,
int col,
ConstantForEnum.MergedRegionStatus mergedRegionStatus)
sheet - 当前sheet对象row - 行号col - 列号mergedRegionStatus - 参考ConstantForEnum.MergedRegionStatuspublic static final int getMergedRegionIndex(org.apache.poi.ss.usermodel.Sheet sheet,
int row,
int col)
sheet - 当前sheet对象row - 行号col - 列号