|
发表于 2014-4-14 22:11:38
|
显示全部楼层
参考如下
List names = new ArrayList();
names.add("name");
names.add("type");
names.add("quantity");
List Types = new ArrayList();
Types.add("String");
Types.add("String");
Types.add("Integer");
//创建table,names代表列,Types代表列的类型
Table table = TableUtils.createTable(null, names, Types);
//增加行
Row row = table.appendRow();
row.setString("name", "a1:汽车之家");
row.setString("type", "a1:宝骏630");
row.setString("quantity", 1);
//增加行
Row row = table.appendRow();
row.setString("name", "a1:汽车之家");
row.setString("type", "S30");
row.setString("quantity", 5);
//增加行
Row row = table.appendRow();
row.setString("name", "a1:汽车之家");
row.setString("type", "瑞麒G3");
row.setString("quantity", 2);
//返回table
return table; |
评分
-
查看全部评分
|