[讨论]java调用excel打印?
[讨论]java调用excel打印?
UploadFile up=new UploadFile();
up.Upload(request,"f:\\","f:\\",".xls");
String filename[]=up.getFilename();
InputExcel in=new InputExcel();
ArrayList list=in.getExcel(filename[0],0);
System.out.println(filename[0]);
if(list!=null)
{
out.println("<table>");
for(int i=0;i<list.size();i++)
{
String str[]=(String[])list.get(i);
out.println("<tr>");
for(int j=0;j<str.length;j++)
out.println(" <td>"+str[j]+"</td>");
out.println("</tr>");
}
out.println("</table>");
}