Ciao a tutti,
sto esportando i dati di una jtable , alcuni di essi sono dichiarati int e quindi nella table contents ho impostato le colonne relative come type integer.
A questo punto quando vado a formattare le celle relative del foglio excel, faccio così:
e poicodice:WritableCellFormat cellFormat3 = new WritableCellFormat(NumberFormats.INTEGER); cellFormat3.setBackground(Colour.BRIGHT_GREEN); cellFormat3.setAlignment(Alignment.CENTRE); cellFormat3.setVerticalAlignment(VerticalAlignment.CENTRE); cellFormat3.setBorder(Border.ALL, BorderLineStyle.THIN);
A questo punto mi da il seguente errore: incompatible types: Object can be converted to Stringcodice:/*Riempimento dati */ for (int i = 1; i < tabellaMesi.getColumnCount(); i++) { for (int j = 0; j < tabellaMesi.getRowCount(); j++) { ws1.addCell(new Label(i + 3, j + 5, tabellaMesi.getValueAt(j, i), cellFormat3)); } }
qui:
non capisco ..qualcuno può aiutarmi?codice:ws1.addCell(new Label(i + 3, j + 5, tabellaMesi.getValueAt(j, i), cellFormat3));
Grazie

Rispondi quotando
