标签:java os io for ar new file public
jxl-2.6.9.14.jar
import net.sf.jxls.transformer.XLSTransformer;//jxls-core-1.0.2.jar
import java.io.File;
public File inputFile;
Workbook workbook = WorkbookFactory.create(inputFile);
Sheet sheet0 = workbook.getSheetAt(0);
int rowNum = sheet0.getLastRowNum() + 1;
for (int i = 1; i < rowNum; i++) {
Row row = sheet0.getRow(i);
Cell cell = row.createCell(lastCell);
cell.setCellValue("");
}
File outputFile = new File("");
FileOutputStream fo = new FileOutputStream(outputFile);
workbook.write(fo);
fo.close();
XLSTransformer former = new XLSTransformer();
Map beanParams = new HashMap();
former.transformXLS(templatePath + exportTemplate, beanParams, outputPath + exportTemplate);
java工具类-excel jxl,布布扣,bubuko.com
标签:java os io for ar new file public
原文地址:http://www.cnblogs.com/heling/p/3874733.html