【发布时间】:2012-11-12 02:49:13
【问题描述】:
我尝试了下面的代码但是不行,我无法创建excel文档,打开和关闭它。
package tests;
import java.io.*;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.util.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class Xls_Reader {
Workbook wb = new XSSFWorkbook();
FileOutputStream fileOut = new FileOutputStream("workbook.xlsx");
}
我收到以下错误:
Default constructor can not handle exception type FileNotFoundException
thrown by implicit super constructor . Must define an explicit constructor.
有人可以帮我理解使用 POI API 创建 excel 文件的概念吗?
【问题讨论】:
标签: java excel compilation compiler-errors apache-poi