//templatePath = request.getSession().getServletContext().getRealPath(templatePath);
InputStream is = request.getSession().getServletContext().getResourceAsStream(templatePath);
if(G4Utils.isEmpty(is)){
log.error(G4Constants.Exception_Head + "未找到模板文件,请确认模板路径是否正确[" + templatePath + "]");
}
Workbook workbook = null;
try {
workbook = Workbook.getWorkbook(is);
} catch (Exception e) {
e.printStackTrace();
}
Sheet sheet = workbook.getSheet(0);
if (G4Utils.isNotEmpty(sheet)) {
int rows = sheet.getRows();
for (int k = 0; k < rows; k++) {
Cell[] cells = sheet.getRow(k);
for (int j = 0; j < cells.length; j++) {