public class ExcelHelper
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
EXCEL_XLS
Excel 2003
|
static java.lang.String |
EXCEL_XLSX
Excel 2007/2010
|
static java.lang.String |
KEY_ENTRYENTITY
分录键名
|
static java.lang.String |
KEY_ROW_INDEX
行索引键名
|
| 构造器和说明 |
|---|
ExcelHelper() |
| 限定符和类型 | 方法和说明 |
|---|---|
static org.apache.poi.ss.usermodel.Row |
addCellAtStart(org.apache.poi.ss.usermodel.Sheet sheet,
int rowIndex) |
static java.util.List<java.util.Map<java.lang.Integer,java.lang.Object>> |
getCellValue(org.apache.poi.ss.usermodel.Workbook workbook,
int sheetIndex,
int startRowIndex) |
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getCellValue(org.apache.poi.ss.usermodel.Workbook workbook,
int sheetIndex,
int startRowIndex,
java.util.Map<java.lang.Integer,java.lang.String> propertyMap) |
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getImportData(java.lang.String fileUrl,
java.lang.String fileName,
int sheetIndex,
int titleRowIndex) |
static java.util.Map<java.lang.String,java.util.List<java.util.Map<java.lang.String,java.lang.Object>>> |
getImportDataMultiEntity(java.lang.String fileUrl,
java.lang.String fileName,
int sheetIndex,
int titleRowIndex) |
static org.apache.poi.ss.usermodel.Workbook |
getImportWorkbook(java.lang.String fileUrl,
java.lang.String fileName) |
static java.util.Map<java.lang.Integer,java.lang.String> |
getTitle(org.apache.poi.ss.usermodel.Workbook workbook,
int sheetIndex,
int rowIndex) |
static java.util.Map<java.lang.Integer,java.lang.String> |
getTitlePropertyName(org.apache.poi.ss.usermodel.Workbook workbook,
int sheetIndex,
int rowIndex) |
static org.apache.poi.ss.usermodel.Workbook |
getWorkbook(java.io.File file) |
static org.apache.poi.ss.usermodel.Workbook |
getWorkbook(java.io.InputStream in,
java.lang.String fileName) |
static org.apache.poi.ss.usermodel.Workbook |
getWorkbook(java.lang.String filePath) |
public static final java.lang.String EXCEL_XLS
public static final java.lang.String EXCEL_XLSX
public static final java.lang.String KEY_ROW_INDEX
public static final java.lang.String KEY_ENTRYENTITY
public static org.apache.poi.ss.usermodel.Workbook getImportWorkbook(java.lang.String fileUrl,
java.lang.String fileName)
throws java.io.IOException
fileUrl - fileName - java.io.IOExceptionpublic static org.apache.poi.ss.usermodel.Workbook getWorkbook(java.lang.String filePath)
throws java.io.IOException
file - java.io.IOExceptionpublic static org.apache.poi.ss.usermodel.Workbook getWorkbook(java.io.File file)
throws java.io.IOException
file - java.io.IOExceptionpublic static org.apache.poi.ss.usermodel.Workbook getWorkbook(java.io.InputStream in,
java.lang.String fileName)
throws java.io.IOException
in - fileName - java.io.IOExceptionpublic static java.util.Map<java.lang.Integer,java.lang.String> getTitle(org.apache.poi.ss.usermodel.Workbook workbook,
int sheetIndex,
int rowIndex)
workbook - sheetIndex - rowIndex - public static java.util.Map<java.lang.Integer,java.lang.String> getTitlePropertyName(org.apache.poi.ss.usermodel.Workbook workbook,
int sheetIndex,
int rowIndex)
workbook - sheetIndex - rowIndex - public static java.util.List<java.util.Map<java.lang.Integer,java.lang.Object>> getCellValue(org.apache.poi.ss.usermodel.Workbook workbook,
int sheetIndex,
int startRowIndex)
workbook - sheetIndex - startRowIndex - public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getCellValue(org.apache.poi.ss.usermodel.Workbook workbook,
int sheetIndex,
int startRowIndex,
java.util.Map<java.lang.Integer,java.lang.String> propertyMap)
workbook - sheetIndex - startRowIndex - propertyMap - public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getImportData(java.lang.String fileUrl,
java.lang.String fileName,
int sheetIndex,
int titleRowIndex)
throws java.io.IOException
fileUrl - fileName - sheetIndex - titleRowIndex - java.io.IOExceptionpublic static java.util.Map<java.lang.String,java.util.List<java.util.Map<java.lang.String,java.lang.Object>>> getImportDataMultiEntity(java.lang.String fileUrl,
java.lang.String fileName,
int sheetIndex,
int titleRowIndex)
throws java.io.IOException
fileUrl - fileName - sheetIndex - titleRowIndex - java.io.IOExceptionpublic static org.apache.poi.ss.usermodel.Row addCellAtStart(org.apache.poi.ss.usermodel.Sheet sheet,
int rowIndex)
sheet - rowIndex -