通过SXSSFWorkbook替换XSSFWorkbook
File file = new File(Constants.WEB_ROOT
+ "templet/price.xlsx");
if (!file.exists()) {
throw new RuntimeException("excel模板文件不存在");
}
Workbook workbook = null;
try {
XSSFWorkbook xssworkbook = new XSSFWorkbook(
new FileInputStream(file));
workbook = new SXSSFWorkbook(xssworkbook, 10000);
} catch (Exception e) {
throw new RuntimeException("excel模板文件打开失败");
}