1
My code when generating a spreadsheet inside an excel file it erases all the others, as I do for it to create the spreadsheet in 2° without it deleting the others?
My code:
import java.io.*;
import org.apache.poi.xssf.usermodel.*;
public class Apache {
public static void main(String[] args)throws Exception {
XSSFWorkbook workbook = new XSSFWorkbook();
FileOutputStream out = new FileOutputStream("workbook.ods");
XSSFSheet spreadsheet = workbook.createSheet("teste 2");
workbook.write(out);
out.close();
System.out.println("workbook.ods");
}
}