import jxl.*; jxl.jar 包
FormFile file = excelActionForm.getTheFile();
Workbook book = Workbook.getWorkbook(file.getInputStream());
Sheet sheet = book.getSheet(0);
int rows = 0;
int cols = 0;
rows = sheet.getRows();
cols = sheet.getColumns();
Cell[] cel = null;
String[] tmp = new String[cols];
//因为EXCEL的第一行为标题,所以内容从第二行开始取
for (int r = 1; r < rows; r++) {
for (int j = 0; j < cols; j++) {
cel = sheet.getRow(r);
tmp[j] = cel[j].getContents().trim();
}