List of usage examples for org.apache.poi.ss.usermodel Sheet setColumnWidth
void setColumnWidth(int columnIndex, int width);
The maximum column width for an individual cell is 255 characters.
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.CharacterCountReportGenerator.java
License:Apache License
/** * Add segment header to the sheet/*from w w w . j a va 2s. c om*/ * * @param p_workBook * @param p_sheet * the sheet * @throws Exception */ private void addSegmentHeader(Workbook p_workBook, Sheet p_sheet) throws Exception { ResourceBundle bundle = m_bundle; int col = 0; int row = SEGMENT_HEADER_ROW; Row segHeaderRow = getRow(p_sheet, row); Cell cell_A = getCell(segHeaderRow, col); cell_A.setCellValue(bundle.getString("lb_segment_id")); cell_A.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_PathAndName = getCell(segHeaderRow, col); cell_PathAndName.setCellValue(bundle.getString("lb_file_path_and_name")); cell_PathAndName.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_B = getCell(segHeaderRow, col); cell_B.setCellValue(bundle.getString("lb_source_segment")); cell_B.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_C = getCell(segHeaderRow, col); cell_C.setCellValue(bundle.getString("lb_source_character_count")); cell_C.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_D = getCell(segHeaderRow, col); cell_D.setCellValue(bundle.getString("lb_target_segment")); cell_D.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_E = getCell(segHeaderRow, col); cell_E.setCellValue(bundle.getString("lb_target_character_count")); cell_E.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_F = getCell(segHeaderRow, col); cell_F.setCellValue(bundle.getString("lb_tm_match_original")); cell_F.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 30 * 256); }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.CommentsAnalysisReportGenerator.java
License:Apache License
/** * Add segment header to the sheet for Comments Analysis Report * // w w w .j a va2 s . c om * @param p_workBook * @param p_sheet * the sheet * @throws Exception */ private void addSegmentHeader(Workbook p_workBook, Sheet p_sheet) throws Exception { int col = 0; int row = SEGMENT_HEADER_ROW; Row segHeaderRow = getRow(p_sheet, row); CellStyle headerStyle = getHeaderStyle(p_workBook); Cell cell_A = getCell(segHeaderRow, col); cell_A.setCellValue(bundle.getString("lb_job_id_report")); cell_A.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_B = getCell(segHeaderRow, col); cell_B.setCellValue(bundle.getString("lb_segment_id")); cell_B.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_C = getCell(segHeaderRow, col); cell_C.setCellValue(bundle.getString("lb_targetpage_id")); cell_C.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_D = getCell(segHeaderRow, col); cell_D.setCellValue(bundle.getString("lb_source_segment")); cell_D.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_E = getCell(segHeaderRow, col); cell_E.setCellValue(bundle.getString("lb_target_segment")); cell_E.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_F = getCell(segHeaderRow, col); cell_F.setCellValue(bundle.getString("lb_sid")); cell_F.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_G = getCell(segHeaderRow, col); cell_G.setCellValue(bundle.getString("lb_character_count")); cell_G.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_H = getCell(segHeaderRow, col); cell_H.setCellValue(bundle.getString("lb_comments")); cell_H.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_I = getCell(segHeaderRow, col); cell_I.setCellValue(bundle.getString("lb_category_failure")); cell_I.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_J = getCell(segHeaderRow, col); cell_J.setCellValue(bundle.getString("lb_tm_match_original")); cell_J.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_K = getCell(segHeaderRow, col); cell_K.setCellValue(bundle.getString("lb_glossary_source")); cell_K.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_L = getCell(segHeaderRow, col); cell_L.setCellValue(bundle.getString("lb_glossary_target")); cell_L.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_M = getCell(segHeaderRow, col); cell_M.setCellValue(bundle.getString("lb_previous_segment_report")); cell_M.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.CommentsAnalysisReportGenerator.java
License:Apache License
private void addCriteriaSheet(Workbook p_workbook, List<Job> p_jobsList, Set<String> stateSet, Set<String> projectSet) throws Exception { Sheet sheet = p_workbook.createSheet(bundle.getString("lb_criteria")); StringBuffer temp = new StringBuffer(); int row = 0;//from ww w . j a v a 2 s .co m int headerColumn = 1; int valueColumn = 2; Row targetLocalesRow = getRow(sheet, row++); Row statusRow = getRow(sheet, row++); Row projectRow = getRow(sheet, row++); Row dateRangeRow = getRow(sheet, row++); Row jobsRow = getRow(sheet, row); Cell cell_TargetLocales = getCell(targetLocalesRow, headerColumn); cell_TargetLocales.setCellValue(bundle.getString("lb_report_target_locales")); cell_TargetLocales.setCellStyle(getContentStyle(p_workbook)); sheet.setColumnWidth(headerColumn, 20 * 256); Cell cell_Status = getCell(statusRow, headerColumn); cell_Status.setCellValue(bundle.getString("job_status")); cell_Status.setCellStyle(getContentStyle(p_workbook)); Cell cell_Project = getCell(projectRow, headerColumn); cell_Project.setCellValue(bundle.getString("lb_report_project")); cell_Project.setCellStyle(getContentStyle(p_workbook)); Cell cell_DateRange = getCell(dateRangeRow, headerColumn); cell_DateRange.setCellValue(bundle.getString("lb_report_date_range")); cell_DateRange.setCellStyle(getContentStyle(p_workbook)); Cell cell_Jobs = getCell(jobsRow, headerColumn); cell_Jobs.setCellValue(bundle.getString("lb_jobs")); cell_Jobs.setCellStyle(getContentStyle(p_workbook)); //locale Set<String> localeSet = rowsMap.keySet(); for (String locale : localeSet) { temp.append(locale + "\n"); } Cell cell_TargetLocalesValue = getCell(targetLocalesRow, valueColumn); cell_TargetLocalesValue.setCellValue(temp.substring(0, temp.length() - 1)); cell_TargetLocalesValue.setCellStyle(getContentStyle(p_workbook)); sheet.setColumnWidth(valueColumn, 45 * 256); //status temp.setLength(0); for (String status : stateSet) { temp.append(status + "\n"); } Cell cell_StatusValue = getCell(statusRow, valueColumn); cell_StatusValue.setCellValue(temp.substring(0, temp.length() - 1)); cell_StatusValue.setCellStyle(getContentStyle(p_workbook)); //project temp.setLength(0); for (String status : projectSet) { temp.append(status + "\n"); } Cell cell_ProjectValue = getCell(projectRow, valueColumn); cell_ProjectValue.setCellValue(temp.substring(0, temp.length() - 1)); cell_ProjectValue.setCellStyle(getContentStyle(p_workbook)); //date range temp.setLength(0); String startCount = request.getParameter(JobSearchConstants.CREATION_START); if (startCount != null && startCount != "") { temp.append("Starts:" + startCount + "\n"); } String endCount = request.getParameter(JobSearchConstants.CREATION_END); if (endCount != null && endCount != "") { temp.append("Ends:" + endCount); } Cell cell_DateRangeValue = getCell(dateRangeRow, valueColumn); cell_DateRangeValue.setCellValue(temp.toString()); cell_DateRangeValue.setCellStyle(getContentStyle(p_workbook)); //jobs int jobRowNum = 4; for (Job job : p_jobsList) { Cell cell_JobValue = getCell(getRow(sheet, jobRowNum++), valueColumn); cell_JobValue.setCellValue(job.getJobId() + "," + job.getJobName()); cell_JobValue.setCellStyle(getContentStyle(p_workbook)); } }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.ImplementedCommentsCheckReportGenerator.java
License:Apache License
/** * Add segment header to the sheet for Implemented Comments Check Report * // ww w. ja va 2 s . c o m * @param p_workBook * @param p_sheet * the sheet * @throws Exception */ private void addSegmentHeader(Workbook p_workBook, Sheet p_sheet) throws Exception { int col = 0; int row = SEGMENT_HEADER_ROW; Row segHeaderRow = getRow(p_sheet, row); CellStyle headerStyle = getHeaderStyle(p_workBook); Cell cell_A = getCell(segHeaderRow, col); cell_A.setCellValue(bundle.getString("lb_job_id_report")); cell_A.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_B = getCell(segHeaderRow, col); cell_B.setCellValue(bundle.getString("lb_segment_id")); cell_B.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_C = getCell(segHeaderRow, col); cell_C.setCellValue(bundle.getString("lb_page_name")); cell_C.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_D = getCell(segHeaderRow, col); cell_D.setCellValue(bundle.getString("lb_source_segment")); cell_D.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_E = getCell(segHeaderRow, col); cell_E.setCellValue(bundle.getString("lb_target_segment")); cell_E.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_F = getCell(segHeaderRow, col); cell_F.setCellValue(bundle.getString("lb_sid")); cell_F.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_G = getCell(segHeaderRow, col); cell_G.setCellValue(bundle.getString("lb_comment_free")); cell_G.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_H = getCell(segHeaderRow, col); cell_H.setCellValue(bundle.getString("lb_category_failure")); cell_H.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_I = getCell(segHeaderRow, col); cell_I.setCellValue(bundle.getString("lb_tm_match_original")); cell_I.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_J = getCell(segHeaderRow, col); cell_J.setCellValue(bundle.getString("lb_glossary_source")); cell_J.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_K = getCell(segHeaderRow, col); cell_K.setCellValue(bundle.getString("lb_glossary_target")); cell_K.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.OnlineJobsReportForIPTranslatorGenerator.java
License:Apache License
private void addTitle(Workbook p_workbook, Sheet p_sheet) throws Exception { String EMEA = CompanyWrapper.getCurrentCompanyName(); Font titleFont = p_workbook.createFont(); titleFont.setUnderline(Font.U_NONE); titleFont.setFontName("Arial"); titleFont.setFontHeightInPoints((short) 14); titleFont.setBoldweight(Font.BOLDWEIGHT_BOLD); CellStyle titleStyle = p_workbook.createCellStyle(); titleStyle.setWrapText(false);//w w w.j av a 2s .c o m titleStyle.setFont(titleFont); Row firRow = getRow(p_sheet, 0); Cell titleCell = getCell(firRow, 0); titleCell.setCellValue(EMEA + " " + m_bundle.getString("online_jobs_for_ip_translator")); titleCell.setCellStyle(titleStyle); p_sheet.setColumnWidth(0, 20 * 256); }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.OnlineJobsReportForIPTranslatorGenerator.java
License:Apache License
private void addParamsSheet(Workbook p_workbook, String year, boolean recalculateFinishedWorkflow) throws Exception { Sheet paramsSheet = p_workbook.createSheet(m_bundle.getString("lb_criteria")); Row firRow = getRow(paramsSheet, 0); Cell cell_A_Header = getCell(firRow, 0); cell_A_Header.setCellValue(m_bundle.getString("lb_report_criteria")); cell_A_Header.setCellStyle(getContentStyle(p_workbook)); paramsSheet.setColumnWidth(0, 50 * 256); Row secRow = getRow(paramsSheet, 1); Cell cell_A_Project = getCell(secRow, 0); if (m_data.wantsAllProjects) { cell_A_Project//from ww w . j a v a 2 s .co m .setCellValue(m_bundle.getString("lb_selected_projects") + " " + m_bundle.getString("all")); cell_A_Project.setCellStyle(getContentStyle(p_workbook)); } else { cell_A_Project.setCellValue(m_bundle.getString("lb_selected_projects")); cell_A_Project.setCellStyle(getContentStyle(p_workbook)); Iterator<Long> iter = m_data.projectIdList.iterator(); int r = 3; while (iter.hasNext()) { Long pid = (Long) iter.next(); String projectName = "??"; try { Project p = ServerProxy.getProjectHandler().getProjectById(pid.longValue()); projectName = p.getName(); } catch (Exception e) { } Row row = getRow(paramsSheet, r); Cell cell_A = getCell(row, 0); cell_A.setCellValue(projectName); cell_A.setCellStyle(getContentStyle(p_workbook)); Cell cell_B = getCell(row, 1); cell_B.setCellValue(m_bundle.getString("lb_id") + "=" + pid.toString()); cell_B.setCellStyle(getContentStyle(p_workbook)); r++; } } Cell cell_C_Header = getCell(firRow, 2); cell_C_Header.setCellValue(m_bundle.getString("lb_Year")); cell_C_Header.setCellStyle(getContentStyle(p_workbook)); Cell cell_C = getCell(secRow, 2); cell_C.setCellValue(year); cell_C.setCellStyle(getContentStyle(p_workbook)); Cell cell_D_Header = getCell(firRow, 3); cell_D_Header.setCellValue(m_bundle.getString("lb_re_cost_jobs")); cell_D_Header.setCellStyle(getContentStyle(p_workbook)); Cell cell_D = getCell(secRow, 3); cell_D.setCellValue(java.lang.Boolean.toString(recalculateFinishedWorkflow)); cell_D.setCellStyle(getContentStyle(p_workbook)); }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.OnlineJobsReportGenerator.java
License:Apache License
private void addTitle(Workbook p_workbook, Sheet p_sheet) throws Exception { String EMEA = CompanyWrapper.getCurrentCompanyName(); Font titleFont = p_workbook.createFont(); titleFont.setUnderline(Font.U_NONE); titleFont.setFontName("Arial"); titleFont.setFontHeightInPoints((short) 14); titleFont.setBoldweight(Font.BOLDWEIGHT_BOLD); CellStyle titleStyle = p_workbook.createCellStyle(); titleStyle.setWrapText(false);//w ww. j ava 2 s . c o m titleStyle.setFont(titleFont); Row firRow = getRow(p_sheet, 0); Cell titleCell = getCell(firRow, 0); titleCell.setCellValue(EMEA + " " + m_bundle.getString("lb_online")); titleCell.setCellStyle(titleStyle); p_sheet.setColumnWidth(0, 20 * 256); }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.PostReviewQAReportGenerator.java
License:Apache License
/** * Add segment header to the sheet/*from w w w .j a v a 2 s .c o m*/ * * @param p_workBook * @param p_sheet * the sheet * @throws Exception */ private void addSegmentHeader(Workbook p_workBook, Sheet p_sheet) throws Exception { int col = 0; int row = SEGMENT_HEADER_ROW; Row segHeaderRow = getRow(p_sheet, row); Cell cell_A = getCell(segHeaderRow, col); cell_A.setCellValue(m_bundle.getString("lb_source_segment")); cell_A.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_B = getCell(segHeaderRow, col); cell_B.setCellValue(m_bundle.getString("lb_original_target_segment")); cell_B.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_C = getCell(segHeaderRow, col); cell_C.setCellValue(m_bundle.getString("lb_updated_target_segment")); cell_C.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_D = getCell(segHeaderRow, col); cell_D.setCellValue(m_bundle.getString("lb_comments_history")); cell_D.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_E = getCell(segHeaderRow, col); cell_E.setCellValue(m_bundle.getString("lb_category_failure")); cell_E.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_F = getCell(segHeaderRow, col); cell_F.setCellValue(m_bundle.getString("lb_comment_status")); cell_F.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 15 * 256); col++; Cell cell_G = getCell(segHeaderRow, col); cell_G.setCellValue(m_bundle.getString("lb_priority")); cell_G.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 15 * 256); col++; Cell cell_H = getCell(segHeaderRow, col); cell_H.setCellValue(m_bundle.getString("lb_tm_match_original")); cell_H.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_I = getCell(segHeaderRow, col); cell_I.setCellValue(m_bundle.getString("lb_glossary_source")); cell_I.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 25 * 256); col++; Cell cell_J = getCell(segHeaderRow, col); cell_J.setCellValue(m_bundle.getString("lb_glossary_target")); cell_J.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 25 * 256); col++; Cell cell_K = getCell(segHeaderRow, col); cell_K.setCellValue(m_bundle.getString("lb_job_id_report")); cell_K.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 15 * 256); col++; Cell cell_L = getCell(segHeaderRow, col); cell_L.setCellValue(m_bundle.getString("lb_segment_id")); cell_L.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 15 * 256); col++; Cell cell_M = getCell(segHeaderRow, col); cell_M.setCellValue(m_bundle.getString("lb_page_name")); cell_M.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 25 * 256); col++; Cell cell_N = getCell(segHeaderRow, col); cell_N.setCellValue(m_bundle.getString("lb_sid")); cell_N.setCellStyle(getHeaderStyle(p_workBook)); p_sheet.setColumnWidth(col, 15 * 256); col++; }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.ReviewersCommentsReportGenerator.java
License:Apache License
/** * Add segment header to the sheet for Reviewers Comments Report * //from w w w.j ava 2 s.c o m * @param p_sheet * the sheet * @param p_row * start row number * @throws Exception */ private void addSegmentHeader(Workbook p_workBook, Sheet p_sheet) throws Exception { int col = 0; int row = SEGMENT_HEADER_ROW; Row segHeaderRow = getRow(p_sheet, row); CellStyle headerStyle = getHeaderStyle(p_workBook); Cell cell_A = getCell(segHeaderRow, col); cell_A.setCellValue(m_bundle.getString("lb_source_segment")); cell_A.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_B = getCell(segHeaderRow, col); cell_B.setCellValue(m_bundle.getString("lb_target_segment")); cell_B.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_C = getCell(segHeaderRow, col); cell_C.setCellValue(m_bundle.getString("latest_comments")); cell_C.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_D = getCell(segHeaderRow, col); cell_D.setCellValue(m_bundle.getString("reviewers_comments_header")); cell_D.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_E = getCell(segHeaderRow, col); cell_E.setCellValue(m_bundle.getString("lb_category_failure")); cell_E.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_F = getCell(segHeaderRow, col); cell_F.setCellValue(m_bundle.getString("lb_comment_status")); cell_F.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 15 * 256); col++; Cell cell_G = getCell(segHeaderRow, col); cell_G.setCellValue(m_bundle.getString("lb_tm_match_original")); cell_G.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_H = getCell(segHeaderRow, col); cell_H.setCellValue(m_bundle.getString("lb_glossary_source")); cell_H.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 25 * 256); col++; Cell cell_I = getCell(segHeaderRow, col); cell_I.setCellValue(m_bundle.getString("lb_glossary_target")); cell_I.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 25 * 256); col++; Cell cell_J = getCell(segHeaderRow, col); cell_J.setCellValue(m_bundle.getString("lb_job_id_report")); cell_J.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 15 * 256); col++; Cell cell_K = getCell(segHeaderRow, col); cell_K.setCellValue(m_bundle.getString("lb_segment_id")); cell_K.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 15 * 256); col++; Cell cell_L = getCell(segHeaderRow, col); cell_L.setCellValue(m_bundle.getString("lb_page_name")); cell_L.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 25 * 256); col++; Cell cell_M = getCell(segHeaderRow, col); cell_M.setCellValue(m_bundle.getString("lb_sid")); cell_M.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 15 * 256); col++; }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.ReviewersCommentsSimpleReportGenerator.java
License:Apache License
/** * Add segment header to the sheet for Reviewers Comments Report * //ww w. j a v a 2s. co m * @param p_sheet * the sheet * @param p_row * start row number * @throws Exception */ private void addSegmentHeader(Workbook p_workBook, Sheet p_sheet) throws Exception { int col = 0; int row = SEGMENT_HEADER_ROW; Row segHeaderRow = getRow(p_sheet, row); CellStyle headerStyle = getHeaderStyle(p_workBook); Cell cell_A = getCell(segHeaderRow, col); cell_A.setCellValue(m_bundle.getString("lb_source_segment")); cell_A.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_B = getCell(segHeaderRow, col); cell_B.setCellValue(m_bundle.getString("lb_target_segment")); cell_B.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_C = getCell(segHeaderRow, col); cell_C.setCellValue(m_bundle.getString("reviewers_comments_header")); cell_C.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_D = getCell(segHeaderRow, col); cell_D.setCellValue(m_bundle.getString("lb_category_failure")); cell_D.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 40 * 256); col++; Cell cell_E = getCell(segHeaderRow, col); cell_E.setCellValue(m_bundle.getString("lb_approved_glossary_source")); cell_E.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_F = getCell(segHeaderRow, col); cell_F.setCellValue(m_bundle.getString("lb_approved_glossary_target")); cell_F.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_G = getCell(segHeaderRow, col); cell_G.setCellValue(m_bundle.getString("lb_tm_match_original")); cell_G.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_H = getCell(segHeaderRow, col); cell_H.setCellValue(m_bundle.getString("lb_job_id_report")); cell_H.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 15 * 256); col++; Cell cell_I = getCell(segHeaderRow, col); cell_I.setCellValue(m_bundle.getString("lb_segment_id")); cell_I.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 15 * 256); col++; Cell cell_J = getCell(segHeaderRow, col); cell_J.setCellValue(m_bundle.getString("lb_page_name")); cell_J.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 25 * 256); col++; Cell cell_K = getCell(segHeaderRow, col); cell_K.setCellValue(m_bundle.getString("lb_sid")); cell_K.setCellStyle(headerStyle); p_sheet.setColumnWidth(col, 15 * 256); col++; }