Results 1 to 4 of 4
- 01-02-2013, 06:44 PM #1
Member
- Join Date
- Jan 2013
- Posts
- 2
- Rep Power
- 0
ArrayIndexOutOfBoundsException in JXL
i have the same problem
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 2
at jxl.read.biff.SheetImpl.getCell(SheetImpl.java:356 )
here is my code
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
String temp = c.getSelectedItem().toString();
String telephone = "" ,code = "",date1 = "",nom_medecin = "";
for (int i= 0;i<sheet.getRows();i++){
if (temp.equals(sheet.getCell(i,1).getContents())) {
telephone=sheet.getCell(i+1, 1).getContents();
System.out.println(telephone);}}
for (int j= 0;j<sheet2.getRows();j++){
if (telephone.equals(sheet2.getCell(1,j).getContents( ))) {
code=sheet2.getCell(j,0).getContents();
System.out.println(code);
date1=sheet2.getCell(j, 2).getContents();
System.out.println(date1);}}
for(int k=0;k<sheet1.getRows();k++){
if(code.equals(sheet1.getCell(k, 0).getContents())){
nom_medecin=sheet1.getCell(k, 3).getContents();
System.out.println(nom_medecin);}}
tab.ajouterLigne(new Object[]{temp,nom_medecin,date1});
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.add(tab);
f.setSize(500, 500);
f.setLocationRelativeTo(null);
f.setVisible(true);
}
});
plz can someone help me
- 01-02-2013, 07:17 PM #2
Senior Member
- Join Date
- Feb 2011
- Posts
- 118
- Rep Power
- 0
Re: ArrayIndexOutofBounds Exception on an Excel File
It's impossible to tell from that example where the exception is being thrown. Which line is #356? What does your spreadsheet look like?
- 01-02-2013, 07:31 PM #3
Member
- Join Date
- Jan 2013
- Posts
- 2
- Rep Power
- 0
Re: ArrayIndexOutofBounds Exception on an Excel File
i have a very big xls file 26808 line and 15 columns
- 01-02-2013, 08:31 PM #4
Re: ArrayIndexOutOfBoundsException in JXL
Removed from ArrayIndexOutofBounds Exception on an Excel File
Don't post to old dead threads and don't hijack another poster's thread.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
what is ArrayIndexOutOfBoundsException ???
By gauravmanral in forum New To JavaReplies: 6Last Post: 07-16-2011, 07:45 AM -
ArrayIndexOutOfBoundsException - sometimes happens, sometimes don't
By Boreeas in forum New To JavaReplies: 3Last Post: 04-10-2011, 08:28 PM -
ArrayIndexOutOfBoundsException
By er1c550n20 in forum New To JavaReplies: 2Last Post: 04-07-2010, 06:50 PM -
ArrayIndexOutOfBoundsException
By Corey in forum New To JavaReplies: 5Last Post: 02-02-2010, 01:25 AM -
ArrayIndexOutofBoundsException help
By filly444 in forum New To JavaReplies: 9Last Post: 09-03-2008, 05:16 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks