Create New Workbook

Aspose.Cells - Create New Workbook

The Workbook class is available for simple use.

Java

Workbook workbook = new Workbook(); // Creating a Workbook object

workbook.save("newWorkBook.xlsx", SaveFormat.XLSX); // Workbooks can be saved in many formats

Apache POI SS - HSSF XSSF - Create New Workbook

Create a new workbook using the Workbook class and save it using FileOutputStream.

Java

Workbook wb = new HSSFWorkbook();

FileOutputStream fileOut;

fileOut = new FileOutputStream("newWorkbook.xls");

wb.write(fileOut);

fileOut.close();

Download Running Code

Download Sample Code