public class FileToExcelManagerImpl extends Object implements FileToExcelManager
CELLTYPESTRING
构造器和说明 |
---|
FileToExcelManagerImpl() |
限定符和类型 | 方法和说明 |
---|---|
List<List<String>> |
readExcel(File file)
读取Excel文件的内容
|
List<List<String>> |
readExcel(File file,
String type)
获取Excel文件中的数据,按给定类型解析文件中的数据。
|
List<Object> |
readExcelAllContentBySheets(File file,
String type,
int... sheetpages)
读取Excel文件的内容,同时将sheetName返回。
|
List<List<List<String>>> |
readExcelBySheets(File file)
读取Excel文件的内容,读取所有sheet中的数据。
|
List<List<List<String>>> |
readExcelBySheets(File file,
int... sheetpages)
读取Excel文件的内容,读取指定sheet中的数据,可以指定多个sheet。
|
List<List<String>> |
readExcelBySheets(File file,
String sheetName)
读取Excel文件的内容,读取指定sheet中的数据。
|
List<List<List<String>>> |
readExcelBySheets(File file,
String type,
int... sheetpages)
读取Excel文件的内容
|
List<List<String>> |
readExcelBySheets(File file,
String type,
String sheetName)
读取Excel文件的内容,读取指定sheet中的数据。
|
void |
save(javax.servlet.http.HttpServletResponse response,
String name,
DataRecord... dataRecords)
保存Excel表格
|
void |
saveAsCSV(javax.servlet.http.HttpServletResponse response,
String fileName,
DataRecord dataRecords)
保存为CSV格式
|
public void save(javax.servlet.http.HttpServletResponse response, String name, DataRecord... dataRecords) throws Exception
save
在接口中 FileToExcelManager
request
- response
- filename
- dataRecords
- Exception
public void saveAsCSV(javax.servlet.http.HttpServletResponse response, String fileName, DataRecord dataRecords)
FileToExcelManager
saveAsCSV
在接口中 FileToExcelManager
public List<List<String>> readExcel(File file) throws Exception
readExcel
在接口中 FileToExcelManager
file
- 待读取的文件Exception
public List<List<String>> readExcel(File file, String type) throws Exception
FileToExcelManager
readExcel
在接口中 FileToExcelManager
file
- 待读取的EXCEL文件type
- 按此类型转换所有数据Exception
public List<List<List<String>>> readExcelBySheets(File file) throws Exception
FileToExcelManager
readExcelBySheets
在接口中 FileToExcelManager
file
- 待读取的EXCEL文件Exception
public List<List<List<String>>> readExcelBySheets(File file, int... sheetpages) throws Exception
FileToExcelManager
readExcelBySheets
在接口中 FileToExcelManager
file
- 待读取的EXCEL文件sheetpages
- 读取的EXCEL文件中的sheet序号, 从0开始。 例如:0,2,4Exception
public List<List<String>> readExcelBySheets(File file, String sheetName) throws Exception
FileToExcelManager
readExcelBySheets
在接口中 FileToExcelManager
file
- 待读取的EXCEL文件sheetName
- 待读取的EXCEL文件中的工作表的名称Exception
public List<List<List<String>>> readExcelBySheets(File file, String type, int... sheetpages) throws Exception
file
- 待读取的EXCEL文件sheetpages
- 待读取的EXCEL文件中的工作表 从0开始Exception
public List<List<String>> readExcelBySheets(File file, String type, String sheetName) throws Exception
file
- 待读取的EXCEL文件sheetName
- 待读取的EXCEL文件中的工作表的名称Exception
public List<Object> readExcelAllContentBySheets(File file, String type, int... sheetpages) throws Exception
readExcelAllContentBySheets
在接口中 FileToExcelManager
file
- 待读取的EXCEL文件sheetpages
- 待读取的EXCEL文件中的工作表 从0开始Exception
Copyright © 2016–2018. All rights reserved.