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 在接口中 FileToExcelManagerrequest - response - filename - dataRecords - Exceptionpublic void saveAsCSV(javax.servlet.http.HttpServletResponse response,
String fileName,
DataRecord dataRecords)
FileToExcelManagersaveAsCSV 在接口中 FileToExcelManagerpublic List<List<String>> readExcel(File file) throws Exception
readExcel 在接口中 FileToExcelManagerfile - 待读取的文件Exceptionpublic List<List<String>> readExcel(File file, String type) throws Exception
FileToExcelManagerreadExcel 在接口中 FileToExcelManagerfile - 待读取的EXCEL文件type - 按此类型转换所有数据Exceptionpublic List<List<List<String>>> readExcelBySheets(File file) throws Exception
FileToExcelManagerreadExcelBySheets 在接口中 FileToExcelManagerfile - 待读取的EXCEL文件Exceptionpublic List<List<List<String>>> readExcelBySheets(File file, int... sheetpages) throws Exception
FileToExcelManagerreadExcelBySheets 在接口中 FileToExcelManagerfile - 待读取的EXCEL文件sheetpages - 读取的EXCEL文件中的sheet序号, 从0开始。 例如:0,2,4Exceptionpublic List<List<String>> readExcelBySheets(File file, String sheetName) throws Exception
FileToExcelManagerreadExcelBySheets 在接口中 FileToExcelManagerfile - 待读取的EXCEL文件sheetName - 待读取的EXCEL文件中的工作表的名称Exceptionpublic List<List<List<String>>> readExcelBySheets(File file, String type, int... sheetpages) throws Exception
file - 待读取的EXCEL文件sheetpages - 待读取的EXCEL文件中的工作表 从0开始Exceptionpublic List<List<String>> readExcelBySheets(File file, String type, String sheetName) throws Exception
file - 待读取的EXCEL文件sheetName - 待读取的EXCEL文件中的工作表的名称Exceptionpublic List<Object> readExcelAllContentBySheets(File file, String type, int... sheetpages) throws Exception
readExcelAllContentBySheets 在接口中 FileToExcelManagerfile - 待读取的EXCEL文件sheetpages - 待读取的EXCEL文件中的工作表 从0开始ExceptionCopyright © 2016–2018. All rights reserved.