[JXL] Erreur ArrayIndexOutOfBoundsException sur premier programme
j'ai telecharger l'api JXL,apres importation du .jar j'ai voulu tester l'api avec un simple exemple suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| Workbook wb = null;
try
{ wb = Workbook.getWorkbook(new File("c:\\de.xls"));
Sheet sheet = wb.getSheet(1);
Cell cell = sheet.getCell("A1");
String Contenu = cell.getContents();
System.out.println(Contenu);
wb.close(); }
catch(Exception e)
{
System.out.println(e);
} |
mais ce code ne marche pas j'obtiens comme erreur :
java.lang.ArrayIndexOutOfBoundsException: 0
Any help??!!