如何使用JXL在单个列中编写arraylist值

时间:2014-06-12 04:42:47

标签: java jxl

如何使用jxl

编写具有单列(ms excel)的ArrayList值(' n'数字)
ArrayList<String> allRecordCount = scrapAllRecord();
Label EEFL = new Label(1, row, allRecordCount.get(0);
sheet.addCell(new Label(EEFL));

allRecordCount有&#39; n&#39;值的数量需要在一列中写出所有这些值

1 个答案:

答案 0 :(得分:0)

使用StringUtils并添加分隔并插入特定列

ArrayList<String> allRecordCount = scrapAllRecord();
Label EEFL = new Label(7, 3,
StringUtils.join(allRecordCount, ','));
sheet.addCell(new Label(EEFL));