List of usage examples for org.apache.poi.ss.usermodel Sheet getRow
Row getRow(int rownum);
From source file:com.globalsight.webservices.AmbassadorHelper.java
License:Apache License
String importWorkOfflineFiles(String p_accessToken, Long p_taskId, String p_identifyKey, int p_workOfflineFileType, boolean p_isJson) throws WebServiceException { String repName = null;/*from w w w. java 2s .co m*/ if (StringUtil.isEmpty(p_identifyKey)) { return makeErrorMessage(p_isJson, IMPORT_WORK_OFFLINE_FILES, "Empty parameter identifyKey"); } // Check work offline file type if (p_workOfflineFileType != 1 && p_workOfflineFileType != 2) { return makeErrorMessage(p_isJson, IMPORT_WORK_OFFLINE_FILES, "Invalid workOfflineFileType " + p_workOfflineFileType + ", it should be limited in 1(for Reviewer Comments Report, Translations Edit Report, Post-Review QA Report or Translation Verification Report) or 2(for Offline Translation Kit)."); } Task task = null; try { task = ServerProxy.getTaskManager().getTask(p_taskId); } catch (Exception e) { logger.warn("Can not get task info by taskId " + p_taskId); } if (task == null) { return makeErrorMessage(p_isJson, IMPORT_WORK_OFFLINE_FILES, "Can not find task by taskId " + p_taskId); } if (task.getState() != Task.STATE_ACCEPTED) { return makeErrorMessage(p_isJson, IMPORT_WORK_OFFLINE_FILES, "This task is not in ACCEPTED state, not allowed to upload translation kit or report."); } User loggedUser = getUser(getUsernameFromSession(p_accessToken)); try { long userCompanyId = ServerProxy.getJobHandler().getCompany(loggedUser.getCompanyName()).getId(); ProjectImpl project = getProjectByTask(task); if (userCompanyId != 1 && userCompanyId != project.getCompanyId()) { return makeErrorMessage(p_isJson, UPLOAD_WORK_OFFLINE_FILES, "Current logged user has no previlege to upload file as it is neither in super company nor in company of specified task."); } } catch (Exception e) { } File tmpSaveFile = null; String fsDirPath = AmbFileStoragePathUtils.getFileStorageDirPath(task.getCompanyId()); StringBuffer parentPath = new StringBuffer(); parentPath.append(fsDirPath).append("/GlobalSight/tmp/").append(p_identifyKey).append("_taskID") .append(p_taskId); File saveDir = new File(parentPath.toString()); if (saveDir.exists() && saveDir.isDirectory()) { File[] subFiles = saveDir.listFiles(); for (int i = 0; i < subFiles.length; i++) { File subFile = subFiles[i]; if (subFile.exists() && subFile.isFile()) { tmpSaveFile = subFile; break; } } } if (tmpSaveFile == null) { return makeErrorMessage(p_isJson, IMPORT_WORK_OFFLINE_FILES, "Can not find the uploaded file for taskId " + p_taskId + " and identifyKey " + p_identifyKey); } if (p_workOfflineFileType == 1) { try { FileInputStream fis = new FileInputStream(tmpSaveFile); Workbook wb = ExcelUtil.getWorkbook(tmpSaveFile.getAbsolutePath(), fis); Sheet sheet = ExcelUtil.getDefaultSheet(wb); repName = sheet.getRow(0).getCell(0).toString(); if (!"Translation Edit Report".equalsIgnoreCase(repName) && !"Reviewers Comments Report".equalsIgnoreCase(repName) && !"Reviewers Comments Report (Simplified)".equalsIgnoreCase(repName) && !"Post-Review QA Report".equalsIgnoreCase(repName) && !"Translation Verification Report".equalsIgnoreCase(repName)) { return makeErrorMessage(p_isJson, UPLOAD_WORK_OFFLINE_FILES, "The file is none of Translation Edit Report, Reviewers Comments Report, Post-Review QA Report or Translation Verification Report file."); } } catch (Exception e) { return makeErrorMessage(p_isJson, UPLOAD_WORK_OFFLINE_FILES, "The file is none of Translation Edit Report, Reviewers Comments Report, Post-Review QA Report or Translation Verification Report file."); } } WebServicesLog.Start activityStart = null; try { Map<Object, Object> activityArgs = new HashMap<Object, Object>(); activityArgs.put("loggedUserName", loggedUser.getUserName()); activityArgs.put("taskId", p_taskId); activityArgs.put("workOfflineFileType", p_workOfflineFileType); activityStart = WebServicesLog.start(Ambassador4Falcon.class, "importWorkOfflineFiles", activityArgs); OfflineEditManager OEM = ServerProxy.getOfflineEditManager(); OEM.attachListener(new OEMProcessStatus()); if (p_workOfflineFileType == 1) { String reportName = WebAppConstants.TRANSLATION_EDIT; if ("Reviewers Comments Report".equalsIgnoreCase(repName) || "Reviewers Comments Report (Simplified)".equalsIgnoreCase(repName)) { reportName = WebAppConstants.LANGUAGE_SIGN_OFF; } else if ("Post-Review QA Report".equalsIgnoreCase(repName)) { reportName = WebAppConstants.POST_REVIEW_QA; } else if ("Translation Verification Report".equalsIgnoreCase(repName)) { reportName = WebAppConstants.TRANSLATION_VERIFICATION; } // Process uploading in same thread, not use separate thread so // that error message can be returned to invoker. String errMsg = OEM.runProcessUploadReportPage(tmpSaveFile, loggedUser, task, tmpSaveFile.getName(), reportName); if (StringUtil.isNotEmpty(errMsg)) { errMsg = errMsg.replaceAll("</?\\w+>", "").replace(" ", ""); // remove all html tags from error message. return makeErrorMessage(p_isJson, IMPORT_WORK_OFFLINE_FILES, errMsg); } } else if (p_workOfflineFileType == 2) { String errMsg = OEM.runProcessUploadPage(tmpSaveFile, loggedUser, task, tmpSaveFile.getName()); if (StringUtil.isNotEmpty(errMsg)) { return makeErrorMessage(p_isJson, IMPORT_WORK_OFFLINE_FILES, errMsg.replaceAll("</?\\w+>", "")); } } } catch (Exception e) { logger.error(e); return makeErrorMessage(p_isJson, IMPORT_WORK_OFFLINE_FILES, "Error when import offline kit or report with exception message " + e.getMessage()); } finally { if (activityStart != null) { activityStart.end(); } } return ""; }
From source file:com.glodon.tika.UpdateEmbeddedDoc.java
License:Apache License
/** * Called to test whether or not the embedded workbook was correctly * updated. This method simply recovers the first cell from the first row * of the first workbook and tests the value it contains. * <p/>/*from w w w .j a v a 2s . c o m*/ * Note that execution will not continue up to the assertion as the * embedded workbook is now corrupted and causes an IllegalArgumentException * with the following message * <p/> * <em>java.lang.IllegalArgumentException: Your InputStream was neither an * OLE2 stream, nor an OOXML stream</em> * <p/> * to be thrown when the WorkbookFactory.createWorkbook(InputStream) method * is executed. * * @throws org.apache.poi.openxml4j.exceptions.OpenXML4JException * Rather * than use the specific classes (HSSF/XSSF) to handle the embedded * workbook this method uses those defeined in the SS stream. As * a result, it might be the case that a SpreadsheetML file is * opened for processing, throwing this exception if that file is * invalid. * @throws java.io.IOException Thrown if a problem occurs in the underlying * file system. */ public void checkUpdatedDoc() throws OpenXML4JException, IOException { Workbook workbook = null; Sheet sheet = null; Row row = null; Cell cell = null; PackagePart pPart = null; Iterator<PackagePart> pIter = null; List<PackagePart> embeddedDocs = this.doc.getAllEmbedds(); if (embeddedDocs != null && !embeddedDocs.isEmpty()) { pIter = embeddedDocs.iterator(); while (pIter.hasNext()) { pPart = pIter.next(); if (pPart.getPartName().getExtension().equals(BINARY_EXTENSION) || pPart.getPartName().getExtension().equals(OPENXML_EXTENSION)) { workbook = WorkbookFactory.create(pPart.getInputStream()); sheet = workbook.getSheetAt(SHEET_NUM); row = sheet.getRow(ROW_NUM); cell = row.getCell(CELL_NUM); assertEquals(cell.getNumericCellValue(), NEW_VALUE, 0.0001); } } } }
From source file:com.griffinslogistics.document.excel.BookLabelGenerator.java
private static void generateHeaders(Sheet sheet, Map<String, CellStyle> styles) { Row row0 = sheet.getRow(0); Row row11 = sheet.getRow(10);/*from w w w . j a va 2s. c o m*/ Cell a1 = row0.createCell(0); a1.setCellStyle(styles.get(STYLE_SMALL_FONT)); Cell b1 = row0.createCell(1); b1.setCellStyle(styles.get(STYLE_SMALL_FONT)); b1.setCellValue(PULSIO_START); Cell d1 = row0.createCell(3); d1.setCellStyle(styles.get(STYLE_SMALL_FONT)); Cell e1 = row0.createCell(4); e1.setCellStyle(styles.get(STYLE_SMALL_FONT)); e1.setCellValue(PULSIO_START); Cell a11 = row11.createCell(0); a11.setCellStyle(styles.get(STYLE_SMALL_FONT)); Cell b11 = row11.createCell(1); b11.setCellStyle(styles.get(STYLE_SMALL_FONT)); b11.setCellValue(PULSIO_START); Cell d11 = row11.createCell(3); d11.setCellStyle(styles.get(STYLE_SMALL_FONT)); Cell e11 = row11.createCell(4); e11.setCellStyle(styles.get(STYLE_SMALL_FONT)); e11.setCellValue(PULSIO_START); }
From source file:com.griffinslogistics.document.excel.BookLabelGenerator.java
private static void generateAddress(Sheet sheet, Map<String, CellStyle> styles, BookLabelModel bookLabelModel) { sheet.addMergedRegion(CellRangeAddress.valueOf("$A2:A3")); sheet.addMergedRegion(CellRangeAddress.valueOf("$A12:A13")); sheet.addMergedRegion(CellRangeAddress.valueOf("$D2:D3")); sheet.addMergedRegion(CellRangeAddress.valueOf("$D12:D13")); Row row2 = sheet.getRow(1); Row row3 = sheet.getRow(2);// www .j a v a 2 s . c o m Cell a2 = row2.createCell(0); a2.setCellValue(ADDRESS); a2.setCellStyle(styles.get(STYLE_LABEL)); Cell a3 = row3.createCell(0); a3.setCellStyle(styles.get(STYLE_LABEL)); Cell d2 = row2.createCell(3); d2.setCellValue(ADDRESS); d2.setCellStyle(styles.get(STYLE_LABEL)); Cell d3 = row3.createCell(3); d3.setCellStyle(styles.get(STYLE_LABEL)); Cell b2 = row2.createCell(1); b2.setCellValue(bookLabelModel.getAddress()); b2.setCellStyle(styles.get(STYLE_CONTENT)); Cell b3 = row3.createCell(1); b3.setCellValue(bookLabelModel.getPostalCode()); b3.setCellStyle(styles.get(STYLE_CONTENT)); Cell e2 = row2.createCell(4); e2.setCellValue(bookLabelModel.getAddress()); e2.setCellStyle(styles.get(STYLE_CONTENT)); Cell e3 = row3.createCell(4); e3.setCellValue(bookLabelModel.getPostalCode()); e3.setCellStyle(styles.get(STYLE_CONTENT)); Row row12 = sheet.getRow(11); Row row13 = sheet.getRow(12); Cell a12 = row12.createCell(0); a12.setCellValue(ADDRESS); a12.setCellStyle(styles.get(STYLE_LABEL)); Cell a13 = row13.createCell(0); a13.setCellStyle(styles.get(STYLE_LABEL)); Cell d12 = row12.createCell(3); d12.setCellValue(ADDRESS); d12.setCellStyle(styles.get(STYLE_LABEL)); Cell d13 = row13.createCell(3); d13.setCellStyle(styles.get(STYLE_LABEL)); Cell b12 = row12.createCell(1); b12.setCellValue(bookLabelModel.getAddress()); b12.setCellStyle(styles.get(STYLE_CONTENT)); Cell b13 = row13.createCell(1); b13.setCellValue(bookLabelModel.getPostalCode()); b13.setCellStyle(styles.get(STYLE_CONTENT)); Cell e12 = row12.createCell(4); e12.setCellValue(bookLabelModel.getAddress()); e12.setCellStyle(styles.get(STYLE_CONTENT)); Cell e13 = row13.createCell(4); e13.setCellValue(bookLabelModel.getPostalCode()); e13.setCellStyle(styles.get(STYLE_CONTENT)); }
From source file:com.griffinslogistics.document.excel.BookLabelGenerator.java
private static void generateClient(Sheet sheet, Map<String, CellStyle> styles, BookLabelModel bookLabelModel) { Row row4 = sheet.getRow(3); Cell a4 = row4.createCell(0);// w w w . j a va 2 s . c o m a4.setCellStyle(styles.get(STYLE_LABEL)); a4.setCellValue(CLIENT); Cell b4 = row4.createCell(1); b4.setCellStyle(styles.get(STYLE_CONTENT)); b4.setCellValue(bookLabelModel.getClient()); Cell d4 = row4.createCell(3); d4.setCellStyle(styles.get(STYLE_LABEL)); d4.setCellValue(CLIENT); Cell e4 = row4.createCell(4); e4.setCellStyle(styles.get(STYLE_CONTENT)); e4.setCellValue(bookLabelModel.getClient()); Row row14 = sheet.getRow(13); Cell a14 = row14.createCell(0); a14.setCellStyle(styles.get(STYLE_LABEL)); a14.setCellValue(CLIENT); Cell b14 = row14.createCell(1); b14.setCellStyle(styles.get(STYLE_CONTENT)); b14.setCellValue(bookLabelModel.getClient()); Cell d14 = row14.createCell(3); d14.setCellStyle(styles.get(STYLE_LABEL)); d14.setCellValue(CLIENT); Cell e14 = row14.createCell(4); e14.setCellStyle(styles.get(STYLE_CONTENT)); e14.setCellValue(bookLabelModel.getClient()); }
From source file:com.griffinslogistics.document.excel.BookLabelGenerator.java
private static void generateTransportation(Sheet sheet, Map<String, CellStyle> styles, BookLabelModel bookLabelModel) { Row row5 = sheet.getRow(4); Cell a5 = row5.createCell(0);// www.j a va 2 s . c o m a5.setCellValue(TRANSPORT_NUMBER); a5.setCellStyle(styles.get(STYLE_LABEL)); Cell b5 = row5.createCell(1); b5.setCellValue(bookLabelModel.getPackageNumber()); b5.setCellStyle(styles.get(STYLE_CONTENT)); Cell d5 = row5.createCell(3); d5.setCellValue(TRANSPORT_NUMBER); d5.setCellStyle(styles.get(STYLE_LABEL)); Cell e5 = row5.createCell(4); e5.setCellValue(bookLabelModel.getPackageNumber()); e5.setCellStyle(styles.get(STYLE_CONTENT)); Row row15 = sheet.getRow(14); Cell a15 = row15.createCell(0); a15.setCellValue(TRANSPORT_NUMBER); a15.setCellStyle(styles.get(STYLE_LABEL)); Cell b15 = row15.createCell(1); b15.setCellValue(bookLabelModel.getPackageNumber()); b15.setCellStyle(styles.get(STYLE_CONTENT)); Cell d15 = row15.createCell(3); d15.setCellValue(TRANSPORT_NUMBER); d15.setCellStyle(styles.get(STYLE_LABEL)); Cell e15 = row15.createCell(4); e15.setCellValue(bookLabelModel.getPackageNumber()); e15.setCellStyle(styles.get(STYLE_CONTENT)); }
From source file:com.griffinslogistics.document.excel.BookLabelGenerator.java
private static void generateTitle(Sheet sheet, Map<String, CellStyle> styles, BookLabelModel bookLabelModel) { sheet.addMergedRegion(CellRangeAddress.valueOf("$A6:A7")); sheet.addMergedRegion(CellRangeAddress.valueOf("$D6:D7")); sheet.addMergedRegion(CellRangeAddress.valueOf("$A16:A17")); sheet.addMergedRegion(CellRangeAddress.valueOf("$D16:D17")); String isbn = bookLabelModel.getISBN() != null ? bookLabelModel.getISBN() : ""; String titleISBNString = String.format("%s %s", bookLabelModel.getTitle(), isbn); Row row6 = sheet.getRow(5); Row row7 = sheet.getRow(6);/*from ww w .ja va 2 s.co m*/ Cell a6 = row6.createCell(0); a6.setCellStyle(styles.get(STYLE_LABEL)); a6.setCellValue(TITLE); Cell a7 = row7.createCell(0); a7.setCellStyle(styles.get(STYLE_LABEL)); Cell b6 = row6.createCell(1); b6.setCellStyle(styles.get(STYLE_CONTENT)); b6.setCellValue(titleISBNString); Cell b7 = row7.createCell(1); b7.setCellStyle(styles.get(STYLE_CONTENT)); b7.setCellValue(bookLabelModel.getBookNumber()); Cell d6 = row6.createCell(3); d6.setCellStyle(styles.get(STYLE_LABEL)); d6.setCellValue(TITLE); Cell d7 = row7.createCell(3); d7.setCellStyle(styles.get(STYLE_LABEL)); Cell e6 = row6.createCell(4); e6.setCellStyle(styles.get(STYLE_CONTENT)); e6.setCellValue(titleISBNString); Cell e7 = row7.createCell(4); e7.setCellStyle(styles.get(STYLE_CONTENT)); e7.setCellValue(bookLabelModel.getBookNumber()); Row row16 = sheet.getRow(15); Row row17 = sheet.getRow(16); Cell a16 = row16.createCell(0); a16.setCellStyle(styles.get(STYLE_LABEL)); a16.setCellValue(TITLE); Cell a17 = row17.createCell(0); a17.setCellStyle(styles.get(STYLE_LABEL)); Cell b16 = row16.createCell(1); b16.setCellStyle(styles.get(STYLE_CONTENT)); b16.setCellValue(titleISBNString); Cell b17 = row17.createCell(1); b17.setCellStyle(styles.get(STYLE_CONTENT)); b17.setCellValue(bookLabelModel.getBookNumber()); Cell d16 = row16.createCell(3); d16.setCellStyle(styles.get(STYLE_LABEL)); d16.setCellValue(TITLE); Cell d17 = row17.createCell(3); d17.setCellStyle(styles.get(STYLE_LABEL)); Cell e16 = row16.createCell(4); e16.setCellStyle(styles.get(STYLE_CONTENT)); e16.setCellValue(titleISBNString); Cell e17 = row17.createCell(4); e17.setCellStyle(styles.get(STYLE_CONTENT)); e17.setCellValue(bookLabelModel.getBookNumber()); }
From source file:com.griffinslogistics.document.excel.BookLabelGenerator.java
private static void generateCountPerBox(Sheet sheet, Map<String, CellStyle> styles, BookLabelModel bookLabelModel) { Row row8 = sheet.getRow(7); Cell a8 = row8.createCell(0);/*from w w w .j a va 2s.c om*/ a8.setCellStyle(styles.get(STYLE_LABEL)); a8.setCellValue(COUNT_PER_BOX); Cell b8 = row8.createCell(1); b8.setCellStyle(styles.get(STYLE_CONTENT)); b8.setCellValue(EX); Cell d8 = row8.createCell(3); d8.setCellStyle(styles.get(STYLE_LABEL)); d8.setCellValue(COUNT_PER_BOX); Cell e8 = row8.createCell(4); e8.setCellStyle(styles.get(STYLE_CONTENT)); e8.setCellValue(EX); Row row18 = sheet.getRow(17); Cell a18 = row18.createCell(0); a18.setCellStyle(styles.get(STYLE_LABEL)); a18.setCellValue(COUNT_PER_BOX); Cell b18 = row18.createCell(1); b18.setCellStyle(styles.get(STYLE_CONTENT)); b18.setCellValue(EX); Cell d18 = row18.createCell(3); d18.setCellStyle(styles.get(STYLE_LABEL)); d18.setCellValue(COUNT_PER_BOX); Cell e18 = row18.createCell(4); e18.setCellStyle(styles.get(STYLE_CONTENT)); e18.setCellValue(EX); }
From source file:com.griffinslogistics.document.excel.BookLabelGenerator.java
private static void generateCountPerAddress(Sheet sheet, Map<String, CellStyle> styles, BookLabelModel bookLabelModel) { Row row9 = sheet.getRow(8); Cell a9 = row9.createCell(0);// w w w.jav a 2 s. c o m a9.setCellStyle(styles.get(STYLE_LABEL)); a9.setCellValue(COUNT_PER_ADDRESS); Cell b9 = row9.createCell(1); b9.setCellStyle(styles.get(STYLE_CONTENT)); b9.setCellValue(bookLabelModel.getCount().toString() + " " + EX); Cell d9 = row9.createCell(3); d9.setCellStyle(styles.get(STYLE_LABEL)); d9.setCellValue(COUNT_PER_ADDRESS); Cell e9 = row9.createCell(4); e9.setCellStyle(styles.get(STYLE_CONTENT)); e9.setCellValue(bookLabelModel.getCount().toString() + " " + EX); Row row19 = sheet.getRow(18); Cell a19 = row19.createCell(0); a19.setCellStyle(styles.get(STYLE_LABEL)); a19.setCellValue(COUNT_PER_ADDRESS); Cell b19 = row19.createCell(1); b19.setCellStyle(styles.get(STYLE_CONTENT)); b19.setCellValue(bookLabelModel.getCount().toString() + " " + EX); Cell d19 = row19.createCell(3); d19.setCellStyle(styles.get(STYLE_LABEL)); d19.setCellValue(COUNT_PER_ADDRESS); Cell e19 = row19.createCell(4); e19.setCellStyle(styles.get(STYLE_CONTENT)); e19.setCellValue(bookLabelModel.getCount().toString() + " " + EX); }
From source file:com.griffinslogistics.excel.BookLabelGenerator.java
private static void generateAddress(Sheet sheet, Map<String, CellStyle> styles, BookLabelModel bookLabelModel) { sheet.addMergedRegion(CellRangeAddress.valueOf("$A2:A3")); sheet.addMergedRegion(CellRangeAddress.valueOf("$A12:A13")); sheet.addMergedRegion(CellRangeAddress.valueOf("$D2:D3")); sheet.addMergedRegion(CellRangeAddress.valueOf("$D12:D13")); Row row2 = sheet.getRow(1); row2.setHeightInPoints(25);//from w w w .ja v a2 s. c om Row row3 = sheet.getRow(2); row3.setHeightInPoints(25); Cell a2 = row2.createCell(0); a2.setCellValue(ADDRESS); a2.setCellStyle(styles.get(STYLE_LABEL)); Cell a3 = row3.createCell(0); a3.setCellStyle(styles.get(STYLE_LABEL)); Cell d2 = row2.createCell(3); d2.setCellValue(ADDRESS); d2.setCellStyle(styles.get(STYLE_LABEL)); Cell d3 = row3.createCell(3); d3.setCellStyle(styles.get(STYLE_LABEL)); Cell b2 = row2.createCell(1); b2.setCellValue(bookLabelModel.getAddress()); b2.setCellStyle(styles.get(STYLE_CONTENT)); Cell b3 = row3.createCell(1); b3.setCellValue(bookLabelModel.getPostalCode()); b3.setCellStyle(styles.get(STYLE_CONTENT)); Cell e2 = row2.createCell(4); e2.setCellValue(bookLabelModel.getAddress()); e2.setCellStyle(styles.get(STYLE_CONTENT)); Cell e3 = row3.createCell(4); e3.setCellValue(bookLabelModel.getPostalCode()); e3.setCellStyle(styles.get(STYLE_CONTENT)); Row row12 = sheet.getRow(11); row12.setHeightInPoints(25); Row row13 = sheet.getRow(12); row13.setHeightInPoints(25); Cell a12 = row12.createCell(0); a12.setCellValue(ADDRESS); a12.setCellStyle(styles.get(STYLE_LABEL)); Cell a13 = row13.createCell(0); a13.setCellStyle(styles.get(STYLE_LABEL)); Cell d12 = row12.createCell(3); d12.setCellValue(ADDRESS); d12.setCellStyle(styles.get(STYLE_LABEL)); Cell d13 = row13.createCell(3); d13.setCellStyle(styles.get(STYLE_LABEL)); Cell b12 = row12.createCell(1); b12.setCellValue(bookLabelModel.getAddress()); b12.setCellStyle(styles.get(STYLE_CONTENT)); Cell b13 = row13.createCell(1); b13.setCellValue(bookLabelModel.getPostalCode()); b13.setCellStyle(styles.get(STYLE_CONTENT)); Cell e12 = row12.createCell(4); e12.setCellValue(bookLabelModel.getAddress()); e12.setCellStyle(styles.get(STYLE_CONTENT)); Cell e13 = row13.createCell(4); e13.setCellValue(bookLabelModel.getPostalCode()); e13.setCellStyle(styles.get(STYLE_CONTENT)); }