jexcel在创建文件时生成错误

时间:2012-05-15 08:43:37

标签: jexcelapi

InputStream inp = new FileInputStream("workbook.xls");
//InputStream inp = new FileInputStream("workbook.xlsx");

Workbook wb = WorkbookFactory.create(inp);

现在以这种方式工作  JExcel使用我的Java应用程序写入Excel工作表。

如何将数组中的数据导出到Excel电子表格?

1 个答案:

答案 0 :(得分:0)

将输出写入文件 我认为它可能适用于写入文件

    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    // new FileOutputStream("workbook.xlsx");
    wb.write(fileOut);
    fileOut.close();