Bonjour à tous,

Je suis actuellement en train de développer un petit programme qui retraite des données présent sur un fichier excel. Tout marche très bien si j'ouvre une fois manuellement le fichier excel et que je clique sur enable editing, je save et je ferme le fichier. En revanche, sans cette manip j'ai l'érreur suivante à l’exécution du prog :

Exception in thread "main" org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: Initialisation of record 0x203(NumberRecord) left 4 bytes remaining still to be read.
at org.apache.poi.hssf.record.RecordInputStream.hasNextRecord(RecordInputStream.java:177)
at org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:234)
at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:494)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:348)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:99)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:256)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:226)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:205)
at algorithm.Read.<init>(Read.java:22)
at Run.main(Run.java:25)

Ma question : savez vous comment je peux activer enable editing depuis java à l'ouverture du fichier ?

j'ouvre mon fichier excel avec ces lignes de code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
		try {		
			wb = WorkbookFactory.create(new File(sourcePath)); 
		}
		catch (EncryptedDocumentException e){
			System.out.println(e);
		}
		catch (InvalidFormatException e){
			System.out.println(e);
		}
ps : je débute en programmation et je en maitrise pas bien encore tout le vocabulaire, soyez indulgent