Lire un fichier excel en java
Bonjour,
google m'a donné un exemple pour lire un fichier excel mais jai un message d'erreur.
code:
Code:
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
| import jxl.*;
import jxl.Workbook;
import jxl.read.biff.*;
import java.io.File;
import java.io.IOException;
import jxl.write.WriteException;
import java.util.Locale;
public class ReadSheetXL {
/**
* @param args
*/
public static void main(String[] args) throws IOException, WriteException, BiffException{
// TODO Auto-generated method stub
try
{
File f1=new File("F:/JAVA PROJECTS/Jexcel/src/r4r/co/in/firstsheet.xls");
WorkbookSettings ws=new WorkbookSettings();
ws.setLocale(new Locale("er","ER"));
Workbook workbook=Workbook.getWorkbook(f1,ws);
Sheet readsheet=workbook.getSheet(0);
System.out.println(readsheet.getName());
}
catch(IOException e)
{
e.printStackTrace();
}
catch(BiffException e)
{
e.printStackTrace();
}
}
} |
Erreur:
Code:
1 2 3 4 5 6 7 8
| Warning: Usage of a local non-builtin name
Warning: Usage of a local non-builtin name
Warning: Usage of a local non-builtin name
Warning: Usage of a local non-builtin name
Warning: Usage of a local non-builtin name
Warning: Usage of a local non-builtin name
Warning: Usage of a local non-builtin name
Warning: Usage of a local non-builtin name |
Merci