【问题标题】:how can i create a sheet in a created excel workbook? [duplicate]如何在创建的 Excel 工作簿中创建工作表? [复制]
【发布时间】:2019-05-13 11:21:59
【问题描述】:
String tablaExcel = "Borrador-pantalla.xlsx";
        String rutaTablaExcel = "C:\\Users\\6001238\\Desktop\\"
                + tablaExcel;
        String hoja = "Hoja1";

        XSSFWorkbook libro = new XSSFWorkbook();
        XSSFSheet hoja1 = libro.createSheet(hoja);

我无法使用 apache poi 在 java 上创建的 excel 中创建工作表 日食

【问题讨论】:

标签: java excel apache-poi


【解决方案1】:

你必须这样使用。

Workbook wb = new HSSFWorkbook(); 
OutputStream fileOut = new FileOutputStream("C:\\Users\\6001238\\Desktop\\yourFileName.xlsx"); 
Sheet sheet1 = wb.createSheet("YourSheetName"); 
--- Rest of the code ---

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-02-11
    • 2018-02-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多