我在java上编写了一个小程序来读取excel,但是如何修改它以便只打印某些单元格?
public class Read
{
public static void main(String [] args) throws Exception
{
File f = new File ("/users/Me/Documents/Test.xls");
Workbook wb = Workbook.getWorkbook(f);
Sheet s = wb.getSheet(0);
int row = s.getRows();
int col = s.getColumns();
for(int i = 0; i<row;i++)
{
for(int j = 0; j<col;j++)
{
Cell c = s.getCell(j,i);
System.out.print(c.getContents()+"\t");
}
}
System.out.println("");
}
}