public class JWEOfficeW extends Object
| 构造器和说明 |
|---|
JWEOfficeW(OutputStream stream,
JWEOfficeEnum xls_xlsx) |
JWEOfficeW(String filePath,
JWEOfficeEnum xls_xlsx) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
addToExcel(int sheetIndex,
List<?> list)
将集合中的数据,通过输出流,写到excel文档中
|
boolean |
addToExcel(String tablename,
List<?> list)
将集合中的数据,通过输出流,写到excel文档中
|
org.apache.poi.ss.usermodel.Workbook |
getWorkbook()
取得 Workbook 接口的实例。
|
void |
write() |
void |
writeAndAutoCloseIO()
写出文档,与自动关闭输出流
|
static boolean |
writeToExcel_xls(OutputStream stream,
String tablename,
List<?> list)
将集合中的数据,通过输出流,写到excel文档中
|
static boolean |
writeToExcel_xls(String filePath,
String tablename,
List<?> list)
将集合中的数据,写到excel文档中
|
static boolean |
writeToExcel_xlsx(OutputStream stream,
String tablename,
List<?> list)
将集合中的数据,通过输出流,写到excel文档中
|
static boolean |
writeToExcel_xlsx(String filePath,
String tablename,
List<?> list)
将集合中的数据,写到excel文档中
|
public JWEOfficeW(OutputStream stream, JWEOfficeEnum xls_xlsx) throws IOException
IOExceptionpublic JWEOfficeW(String filePath, JWEOfficeEnum xls_xlsx) throws IOException
IOExceptionpublic org.apache.poi.ss.usermodel.Workbook getWorkbook()
public void write()
throws IOException
IOExceptionpublic void writeAndAutoCloseIO()
throws IOException
IOException - io流异常public boolean addToExcel(String tablename, List<?> list) throws Exception
tablename - excel工作表名称list - 数据集合Exception - 异常public boolean addToExcel(int sheetIndex,
List<?> list)
throws Exception
sheetIndex - 第几个excel工作表 (程序组装: "sheet"+sheetIndex )list - 数据集合Exception - 异常public static boolean writeToExcel_xls(String filePath, String tablename, List<?> list)
filePath - excel文档的路径tablename - excel工作表名称list - 数据集合public static boolean writeToExcel_xls(OutputStream stream, String tablename, List<?> list)
stream - 输出流tablename - excel工作表名称list - 数据集合public static boolean writeToExcel_xlsx(String filePath, String tablename, List<?> list)
filePath - excel文档的路径tablename - excel工作表名称list - 数据集合public static boolean writeToExcel_xlsx(OutputStream stream, String tablename, List<?> list)
stream - 输出流tablename - excel工作表名称list - 数据集合Copyright © 2019. All rights reserved.