Vê se isso te ajuda.
http://www.guj.com.br/posts/list/134926.java
erro:
java.lang.IllegalStateException:
[code]package mascarenhas.relatorio.telefonia;
import java.io.FileInputStream;
import java.io.IOException;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
public class Teste {
public static void main(String[] args) throws IOException {
HSSFWorkbook wb = null;
HSSFRow row = null;
HSSFCell cell = null;
HSSFSheet sheet1 = null;
HSSFSheet sheet2 = null;
HSSFSheet sheet3 = null;
HSSFRow row1 = null;
HSSFRow row2 = null;
HSSFCell cel = null;
HSSFCell cel1 = null;
HSSFCell cel2 = null;
HSSFCell cel3 = null;
String path = "c:/teste.xls";
FileInputStream fis = new FileInputStream(path);
wb = new HSSFWorkbook(fis);
sheet1 = wb.getSheetAt(0);
row1 = sheet1.getRow(0);
row2 = sheet1.getRow(1);
cel = row1.getCell(0);
cel1 = row1.getCell(1);
cel2 = row2.getCell(0);
cel3 = row2.getCell(1);
String nome = cel.getStringCellValue();
System.out.println(nome + " " +cel1.getStringCellValue() +"\n" +cel2.getStringCellValue() +" "
+cel3.getStringCellValue()); // nessa instrução aqui cel3, essa celula no excel tem um numero 20
}
}
[/code]