hey, and it is me again...
i found out how to read in stuff from an excel sheet, i am preety proud about it, but althought it is working, i am getting a really strange error message
Warning: Property storage name for 5 is empty - setting to Root Entry
1
2
3
4
5
6
7
8
9
10
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10
at jxl.read.biff.SheetImpl.getCell(SheetImpl.java:354 )
at Excel.main(Excel.java:23)
and my code is:
import java.io.File;
import java.io.IOException;
import java.util.Date;
import jxl.*;
import jxl.read.biff.BiffException;
public class Excel
{
public static void main(String[] args) throws BiffException, IOException
{
Workbook workbook = Workbook.getWorkbook(new File("//Volumes//ws.xls"));
Sheet sheet = workbook.getSheet(0);
int x;
for(int a = 0; a < 11 ; a++)
{
Cell a1 = sheet.getCell(0,a);
String stringa1 = a1.getContents();
x = Integer.parseInt(stringa1);
System.out.println(x);
}
}
}
does anyone know how to handle it...
little:polarbear
