当我尝试导出文件时,错误为java.lang.NumberFormatException: For input string: "loadltklSubmitInfo"
这是我制作Excel文件的JSP:
<tr>
<th>Nama File Zip</th>
<th>Jumlah Data LTKL Terkirim</th>
<th>Jumlah Data LTKL Terproses</th>
<th>Jumlah Data LTKL Sukses</th>
<th>Tanggal Kirim</th>
<th>Tanggal Terima</th>
</tr>
<c:forEach items="${data.loadltklSubmitInfo}" var="ltklSubmit">
<td><c:out value="${ltklSubmit.zipFileName}" /> </td>
<td><c:out value="${ltklSubmit.ltklCount}" /></td>
<td><c:out value="${ltklSubmit.ltklCountProcess}" /></td>
<td><c:out value="${ltklSubmit.ltklCountSuccess}" /></td>
<td><fmt:formatDate value="${ltklSubmit.sentDate}" pattern='dd/MM/yyyy HH:mm:ss'/></td>
<td><fmt:formatDate value="${ltklSubmit.receiveDate}" pattern='dd/MM/yyyy HH:mm:ss'/></td>
</c:forEach>
这是我的控制器
@RequestMapping ("/cekSubmitExport.htm")
public ModelAndView loadExportExcelLTKL (HttpServletResponse response, HttpServletRequest request)
{
response.setHeader("Pragma", "No-Cache");
response.setHeader("Cache-Control", "no-cache");
response.setContentType("application/vnd.ms-excel");
response.setDateHeader("Expires", 1);
//String type = request.getParameter("type");
String file = request.getParameter("zipFileName");
ModelAndView view = new ModelAndView("cekSubmitExportView");
//if (type.equals("1"))
//{
response.setHeader("Content-Disposition", "inline; filename=HasilSubmitLTKL.xls");
//view.addObject("flag", "1");
view.addObject("data", exportExcelService.getltklSubmitInfoByFile(file));
这是我的服务:
@Autowired
private LtklSubmitInfoDao ltklSubmitInfoDao;
@Transactional(readOnly = false, propagation = Propagation.REQUIRED, isolation = Isolation.SERIALIZABLE, rollbackFor = {Exception.class})
public List<LtklSubmitInfo> getltklSubmitInfoByFile(String zipFileName)
{
return ltklSubmitInfoDao.loadAll(zipFileName);
}