in my program i want to write an String to *.xlsx
Example for the String:
a,b,c,d,e,,f,\na,b,c,d,e,,f,\n
I want to write an Excel file which looks like this:
How can I do this?
private void createExcel() throws Exception {
//Create blank workbook
XSSFWorkbook workbook = new XSSFWorkbook();
//Create a blank sheet
XSSFSheet spreadsheet = workbook.createSheet("Excel Sheet");
How can I create the rows and columns from my csvString?
//Write the workbook in file system
FileOutputStream out = new FileOutputStream(new File("FilePath.xlsx"));
workbook.write(out);
out.close();
System.out.println("*.xlsx written successfully" );
}
I'm thankful for any help