I trying to find a way to set borders to each cell and the optimal width to each column before creating the ods file [or either after the file has been created - i don't mind]. I'm writing the program in Java and I'm using the jopendocument library to create the ods file which is rich of method and tools but unfortunately I can't find any method in the documentation to set border or the optimal width for a column so i would like to know if anyone knows a library or way to do that.
public static void QuadernoFatture() throws FileNotFoundException, IOException {
fatture.sort(Comparator.comparing(StrutturaFattura::getNumero));
final Object[][] data = new Object[fatture.size()][7];
for(int i=0;i<fatture.size();i++) {
data[i]=new Object[] {fatture.get(i).cliente,fatture.get(i).numero,fatture.get(i).imponibile,fatture.get(i).iva,
fatture.get(i).TotFatt,fatture.get(i).r_a,fatture.get(i).TotPagare};
}
fatture.clear();
String[] columns = new String[] {"CLIENTE" , "N° FATTURA" , "IMPONIBILE" , "IVA" , "TOTALE FATTURA" , "R_ACCONTO" , "TOTALE DA PAGARE"};
TableModel model = new DefaultTableModel(data,columns);
Date now = new Date();
SimpleDateFormat dateFormatter = new SimpleDateFormat("MMMM_yyyy");
final File file = new File("/home/max/Documents/quadernoFatture/QuadernoFatture_" +dateFormatter.format(now).toString()+".ods");
SpreadSheet.createEmpty(model).saveAs(file);
OOUtils.open(file);
}