1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package
com.xiaoye.demo;
import
java.io.FileOutputStream;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook;
import
org.apache.poi.ss.usermodel.Workbook;
/**
*
* @author 小夜的传说
* 2014-2-20 下午6:19:48
* 创建Sheet页
*/
public
class
CreateSheet {
public
static
void
main(String[] args)
throws
Exception {
Workbook wb=
new
HSSFWorkbook();
wb.createSheet(
"第1个Sheet页"
);
wb.createSheet(
"第2个Sheet页"
);
FileOutputStream out=
new
FileOutputStream(
"d://创建Sheet页.xls"
);
wb.write(out);
out.close();
System.out.println(
"end"
);
}
}
|
效果图:
本文转自 小夜的传说 51CTO博客,原文链接:http://blog.51cto.com/1936625305/1362143,如需转载请自行联系原作者