Je crée mon Worksheet :
1 2 3 4 5 6 7 8 9 10
| this.refworkbook = Workbook.getWorkbook(new File(Constantes.MODELE_EXCEL));
this.workbook = Workbook.createWorkbook(new File(this.output_file),this.refworkbook);
this.placette = this.workbook.getSheet("Placettes");
this.humus = this.workbook.getSheet("Humus");
this.flore = this.workbook.getSheet("Flore");
this.vegetation = this.workbook.getSheet("Vegetation");
this.etude = this.workbook.getSheet("Etude");
this.profil = this.workbook.getSheet("Profil");
this.horizon_description = this.workbook.getSheet("Horizon Description");
this.horizon_analyse = this.workbook.getSheet("Horizon Analyse"); |
Ensuite j'effecture un detele :
this.humus.deleteRows(2);
J'ajoute mes Labels à mes sheets et je write mon Worksheet :
1 2 3 4 5 6 7 8
| public void write(){
try {
this.workbook.write();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} |
J'obtiens alors un java.lang.null.pointer.Exception sur mon workbook :S
Partager