InputStream inp = new FileInputStream("workbook.xls");
//InputStream inp = new FileInputStream("workbook.xlsx");
Workbook wb = WorkbookFactory.create(inp);
现在以这种方式工作 JExcel使用我的Java应用程序写入Excel工作表。
如何将数组中的数据导出到Excel电子表格?
答案 0 :(得分:0)
将输出写入文件 我认为它可能适用于写入文件
FileOutputStream fileOut = new FileOutputStream("workbook.xls");
// new FileOutputStream("workbook.xlsx");
wb.write(fileOut);
fileOut.close();