Bonjour,
Je suis très embêtée... Je souhaite créer un fichier .xlsx mais apres l'exécution de mon code je ne peux ouvrir le fichier car celui ci est corrompue...
Merci beaucoup pour votre aide !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 public class Test { public static void main(String[] args) { // TODO Auto-generated method stub try { Workbook wb = new XSSFWorkbook(); FileOutputStream fileOut = new FileOutputStream("D:\\workbook.xlsx"); wb.write(fileOut); fileOut.close(); } catch (Exception e) { } finally { } } }
Partager