try
{
int i=0;
ii=res.getMetaData().getColumnCount();
while(res.next())
{
i++;
HSSFRow row2=sheet.createRow((short)i);
for(int j=0;j<ii;j++)
{
String ss="";
if(res.getString(j+1)==null)
ss="空 null";
else
ss=res.getString(j+1);
cteateCell(wb,row2,(short)j,ss);
}
}
} catch(SQLException e)
{
e.printStackTrace();
}
wb.write(os);
os.flush();
os.close();
}我现在需要传的是一个LIST 也是对了一张表的遍历 怎么写?????
{
int i=0;
ii=res.getMetaData().getColumnCount();
while(res.next())
{
i++;
HSSFRow row2=sheet.createRow((short)i);
for(int j=0;j<ii;j++)
{
String ss="";
if(res.getString(j+1)==null)
ss="空 null";
else
ss=res.getString(j+1);
cteateCell(wb,row2,(short)j,ss);
}
}
} catch(SQLException e)
{
e.printStackTrace();
}
wb.write(os);
os.flush();
os.close();
}我现在需要传的是一个LIST 也是对了一张表的遍历 怎么写?????
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货