File file = new File(fileName); //原始excel
File fileTemp = new File(format+".xlsx");//新excel
if(file.exists()){
EasyExcel.write(file, VoucherHeader.class).needHead(false).
withTemplate(file).file(fileTemp).sheet("Sheet1").doWrite(dataList);
}
注:原始excel和新excel的名字不能相同