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中创建工作表 月食
答案 0 :(得分:0)
您必须像这样使用。
Workbook wb = new HSSFWorkbook();
OutputStream fileOut = new FileOutputStream("C:\\Users\\6001238\\Desktop\\yourFileName.xlsx");
Sheet sheet1 = wb.createSheet("YourSheetName");
--- Rest of the code ---