addRow(parkingBDSpreadsheet, parkingParty, row);
if (parkingParty != null) { addRow(parkingBDSpreadsheet, parkingParty, row); }
    public ActionForward mergeFilesAndExport(ActionMapping mapping, ActionForm actionForm,            HttpServletRequest request, HttpServletResponse response) throws Exception {        OpenFileBean openFileBean = (OpenFileBean) getRenderedObject();        if (openFileBean != null) {            //if (openFileBean.getFileName().equalsIgnoreCase("Cartes_XML.mdb")) {            System.out.println("987654" + openFileBean.getFileName());            try {                response.setContentType("text/plain");                response.setHeader("Content-disposition", "attachment; filename=parkingDB_merge.xls");                Database database = Database.open(FileUtils.copyToTemporaryFile(openFileBean                        .getInputStream()));                Table table = database.getTable("XML");                List<ParkingParty> parkingParties = getValidParkingParties();                final HSSFWorkbook workbook = new HSSFWorkbook();                final ExcelStyle excelStyle = new ExcelStyle(workbook);                final ServletOutputStream writer = response.getOutputStream();                final Spreadsheet parkingBDSpreadsheet = new Spreadsheet("BD Fnix Parque");                setHeaders(parkingBDSpreadsheet);                for (Map<String, Object> row = table.getNextRow(); row != null; row = table.getNextRow()) {                    Long cardNumber = new Long((String) row.get("Card"));                    ParkingParty parkingParty = getParkingPartyCardNumber(cardNumber, parkingParties);                    addRow(parkingBDSpreadsheet, parkingParty, row);                }                for (ParkingParty parkingParty : parkingParties) {                    fillInRow(parkingBDSpreadsheet, parkingParty);                }                database.close();                parkingBDSpreadsheet.exportToXLSSheet(workbook, excelStyle.getHeaderStyle(), excelStyle                        .getStringStyle());                workbook.write(writer);                writer.flush();                response.flushBuffer();            } catch (Exception e) {                throw new FenixServiceException();            }            //            } else {            //                ActionMessages actionMessages = getMessages(request);            //                actionMessages.add("file", new ActionMessage("error.inccorrect.file"));            //                saveMessages(request, actionMessages);            //                RenderUtils.invalidateViewState();            //                return mapping.getInputForward();            //            }        }        return null;    }