一个简单的例子 ~~~
Student stu=new Student();
for(int j=0;j<sheet.getColumns();j++)
{
content=sheet.getCell(j, i).getContents();
System.out.println(j+"----"+i);
System.out.print(content);
if(stu.getId()==0)
{
stu.setId(Integer.parseInt(sheet.getCell(j, i).getContents()));
continue;
}
if(stu.getName()==null)
{
stu.setName(sheet.getCell(j, i).getContents());
continue;
}
if(stu.getAge()==0)
{
stu.setAge(Integer.parseInt(sheet.getCell(j, i).getContents()));
continue;
}