Salut à tous,
Deux question concernant Java Excel :
1 ► Quand j'ouvre un fichier xlsx de 1.06 Mo tout va bien mais de 3.23 Mo il me dit :
Même erreur avec :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 Caused by: java.io.IOException: Zip bomb detected! The file would exceed the max. ratio of compressed file size to the size of the expanded data. This may indicate that the file is used to inflate memory usage and thus could pose a security risk. You can adjust this limit via ZipSecureFile.setMinInflateRatio() if you need to work with files which exceed this limit. Counter: 827392, cis.counter: 8192, ratio: 0.009900990099009901Limits: MIN_INFLATE_RATIO: 0.01
2 ► Puis-je ouvrir un fichier xls avec un XSSF, car quand j'essaye il me dit :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 double ratio = 0.0099900990099009901; ZipSecureFile.setMinInflateRatio(ratio);
Merci à tous
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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62 Exception in thread "AWT-EventQueue-0" org.apache.poi.openxml4j.exceptions.InvalidOperationException: Can't open the specified file: 'Z:\Nathan\4F_VOPS_MM_S2C_Current_Tab_2016-01-23_15-52-14.xls' at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:135) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:257) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:202) at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:302) at EVENT.UtilityMethods.createTabPanel(UtilityMethods.java:110) at EVENT.UtilityMethods.createJTabbed(UtilityMethods.java:74) at EVENT.Events.btnLoad_click(Events.java:68) at EVENT.Events.actionPerformed(Events.java:39) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener$Actions.actionPerformed(Unknown Source) at javax.swing.SwingUtilities.notifyAction(Unknown Source) at javax.swing.JComponent.processKeyBinding(Unknown Source) at javax.swing.KeyboardManager.fireBinding(Unknown Source) at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source) at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source) at javax.swing.JComponent.processKeyBindings(Unknown Source) at javax.swing.JComponent.processKeyEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.zip.ZipFile.<init>(Unknown Source) at org.apache.poi.openxml4j.util.ZipSecureFile.<init>(ZipSecureFile.java:142) at org.apache.poi.openxml4j.opc.internal.ZipHelper.openZipFile(ZipHelper.java:158) at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:133) ... 51 more![]()
Partager