• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Region类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.poi.hssf.util.Region的典型用法代码示例。如果您正苦于以下问题:Java Region类的具体用法?Java Region怎么用?Java Region使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Region类属于org.apache.poi.hssf.util包,在下文中一共展示了Region类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: pushSheetToExcelBySQL

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
/**可重复调用以达到在一个工作簿生成多个Sheet的目的*/
	private void pushSheetToExcelBySQL(String title,String sql,String SheetName){
		writerDataBySQL(sql);
		//创建工作表
		HSSFSheet sheet = wb.createSheet(SheetName);
		HSSFRow row ;
		HSSFCell cell ;
		//创建标题
		row = sheet.createRow(0);
		cell = row.createCell(0);
		cell.setCellValue(new HSSFRichTextString(title));
		cell.setCellStyle(titleStyle);
		sheet.addMergedRegion(new Region(0,(short)0,0,(short)(ColNum-1)));//合并单元格
//		System.out.println(RowNum+":"+ColNum);
		//创建正文
		for (int i=0;i<RowNum;i++){
			row = sheet.createRow(i+1);
			for (int j=0;j<ColNum;j++){
				cell = row.createCell(j);
				cell.setCellValue(new HSSFRichTextString(tables.get(i)[j].trim()));
				cell.setCellStyle(contentStyle);
			}
		}
	}
 
开发者ID:Kuangcp,项目名称:JavaToolKit,代码行数:25,代码来源:TableTurnExcel.java


示例2: listTurnSheet

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
/**
	 *
	 * @param title 标题
	 * @param data 数据 List String数组
	 * @param SheetName 单个Sheet名字
	 */
	private void listTurnSheet(String title,List<String[]> data,String SheetName){
		HSSFSheet sheet = wb.createSheet(SheetName);
		HSSFRow row ;
		HSSFCell cell ;
		int ColNum = data.get(0).length;
		int RowNum = data.size();
		//创建标题
		row = sheet.createRow(0);
		cell = row.createCell(0);
		cell.setCellValue(new HSSFRichTextString(title));
		cell.setCellStyle(titleStyle);
		sheet.addMergedRegion(new Region(0,(short)0,0,(short)(ColNum-1)));//合并单元格
//		System.out.println(RowNum+":"+ColNum);
		//创建正文
		for (int i=0;i<RowNum;i++){
			row = sheet.createRow(i+1);
			for (int j=0;j<ColNum;j++){
				cell = row.createCell(j);
				cell.setCellValue(new HSSFRichTextString(data.get(i)[j].trim()));
				cell.setCellStyle(contentStyle);
			}
		}
	}
 
开发者ID:Kuangcp,项目名称:JavaToolKit,代码行数:30,代码来源:TableTurnExcel.java


示例3: generateLogo

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
public void generateLogo(Sheet sheet, int length, Workbook wb, String basePath, Image image) {
    if (image == null) {
        return;
    }

    ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
    BufferedImage bufferImg;
    HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 220, 200,
            (short) image.getColFrom(), image.getRowFrom(), (short) (image.getColTo()), image.getRowTo());
    try {
        HSSFSheet xlsSheet = (HSSFSheet) sheet;
        String imageFilePath = "d:/app/tmp";
        bufferImg = ImageIO.read(new File(basePath + imageFilePath));
        ImageIO.write(bufferImg, "jpg", byteArrayOut);
        xlsSheet.addMergedRegion(new Region(image.getRowFrom(), (short) image.getColFrom(),
                image.getRowTo(), (short) (image.getColTo() - 1)));
        HSSFPatriarch patriarch = xlsSheet.createDrawingPatriarch();
        patriarch.createPicture(anchor, wb.addPicture(
                byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG));
    } catch (IOException e) {
        e.printStackTrace();
    }
}
 
开发者ID:cgfalcon,项目名称:fluentexcel,代码行数:24,代码来源:XlsRender.java


示例4: getMergedCells

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
public static boolean[][] getMergedCells(HSSFSheet sheet) {
    int lastRowNum = sheet.getLastRowNum();
    short maxCellNum = getMaxCellNum(sheet);

    // Compute merged regions
    boolean[][] merged = new boolean[lastRowNum + 1][maxCellNum + 1];
    for (int i = 0; i < sheet.getNumMergedRegions(); i++) {
        Region region = sheet.getMergedRegionAt(i);
        for (int rowNum = region.getRowFrom(); rowNum <= region.getRowTo(); rowNum++) {
            for (int columnNum = region.getColumnFrom(); columnNum <= region.getColumnTo(); columnNum++) {
                if (rowNum != region.getRowFrom() || columnNum != region.getColumnFrom())
                    merged[rowNum][columnNum] = true;
            }
        }
    }

    return merged;
}
 
开发者ID:evlist,项目名称:orbeon-forms,代码行数:19,代码来源:XLSUtils.java


示例5: copySheet

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
public static void copySheet(HSSFWorkbook workbook, HSSFSheet destination, HSSFSheet source) {

        // Copy column width
        short maxCellNum = getMaxCellNum(source);
        for (short i = 0; i <= maxCellNum; i++) {
            destination.setColumnWidth(i, source.getColumnWidth(i));
        }

        // Copy merged cells
        for (int i = 0; i < source.getNumMergedRegions(); i++) {
            Region region = source.getMergedRegionAt(i);
            destination.addMergedRegion(region);
        }

        // Copy rows
        for (int i = 0; i <= source.getLastRowNum(); i++) {
            HSSFRow sourceRow = source.getRow(i);
            HSSFRow destinationRow = destination.createRow(i);
            copyRow(workbook, destinationRow, sourceRow);
        }
    }
 
开发者ID:evlist,项目名称:orbeon-forms,代码行数:22,代码来源:XLSUtils.java


示例6: copyRow

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
	public static void copyRow(HSSFSheet srcSheet, HSSFSheet destSheet, HSSFRow srcRow, HSSFRow destRow, Map<Integer, HSSFCellStyle> styleMap) {  
        Set mergedRegions = new TreeSet();  
        destRow.setHeight(srcRow.getHeight());  
        for (int j = srcRow.getFirstCellNum(); j <= srcRow.getLastCellNum(); j++) {  
            HSSFCell oldCell = srcRow.getCell(j);  
            HSSFCell newCell = destRow.getCell(j);  
            if (oldCell != null) {  
                if (newCell == null) {  
                    newCell = destRow.createCell(j);  
                }  
                copyCell(oldCell, newCell, styleMap);  
                Region mergedRegion = getMergedRegion(srcSheet, srcRow.getRowNum(), oldCell.getCellNum());  
                if (mergedRegion != null) {  
//	                    Region newMergedRegion = new Region( destRow.getRowNum(), mergedRegion.getColumnFrom(),  
//	                            destRow.getRowNum() + mergedRegion.getRowTo() - mergedRegion.getRowFrom(), mergedRegion.getColumnTo() );  
                    Region newMergedRegion = new Region(mergedRegion.getRowFrom(), mergedRegion.getColumnFrom(),  
                            mergedRegion.getRowTo(), mergedRegion.getColumnTo());  
                    if (isNewMergedRegion(newMergedRegion, mergedRegions)) {  
                        mergedRegions.add(newMergedRegion);  
                        destSheet.addMergedRegion(newMergedRegion);  
                    }  
                }  
            }  
        }  
          
    }
 
开发者ID:rmage,项目名称:gnvc-ims,代码行数:28,代码来源:MultiPageReportModel.java


示例7: getMergedRegion

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
public static Region getMergedRegion(HSSFSheet sheet, int rowNum, short cellNum) {  
    for (int i = 0; i < sheet.getNumMergedRegions(); i++) {  
        Region merged = sheet.getMergedRegionAt(i);  
        if (merged.contains(rowNum, cellNum)) {  
            return merged;  
        }  
    }  
    return null;  
}
 
开发者ID:rmage,项目名称:gnvc-ims,代码行数:10,代码来源:MultiPageReportModel.java


示例8: downloadXLSFileBase

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
public FileTransfer downloadXLSFileBase(List<String[]> list,
	String filename, String name) throws Exception {
if (list == null) {
	list = new ArrayList<String[]>();
}
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet();

HSSFCellStyle cs = wb.createCellStyle();
cs.setBorderBottom(HSSFCellStyle.BORDER_THIN);
cs.setBorderLeft(HSSFCellStyle.BORDER_THIN);
cs.setBorderRight(HSSFCellStyle.BORDER_THIN);
cs.setBorderTop(HSSFCellStyle.BORDER_THIN);
cs.setAlignment(HSSFCellStyle.ALIGN_CENTER);
cs.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);

int columnCount = list.get(0).length;
sheet.setColumnWidth((short) 0, (short) 100);
sheet.addMergedRegion(new Region((short) 0, (short) 0, (short) 0,
		(short) columnCount));
for (int i = 1; i <= columnCount; i++) {
	sheet.setColumnWidth((short) i, (short) 4000);
}
// 表名
HSSFRow row1 = sheet.createRow(0);
HSSFCell cell = row1.createCell((short) 0);
// cell.setEncoding((short) 0);
cell.setCellValue(name);
cell.setCellStyle(cs);
row1.setHeight((short) 800);

HSSFRow rows = null;
for (int i = 0; i < list.size(); i++) {
	rows = sheet.createRow(i + 1);
	String cellDate[] = list.get(i);
	HSSFCell cells = null;
	for (int j = 0; j < cellDate.length; j++) {
		cells = rows.createCell((short) (j + 1));
		// cells.setEncoding((short) j);
		cells.setCellValue(cellDate[j]);
		cells.setCellStyle(cs);
	}
	if (i == 0) {
		rows.setHeight((short) 600);// 标题行宽
	}
}
wb.write(buffer);
return new FileTransfer(filename, "application/x-xls", buffer
		.toByteArray());
}
 
开发者ID:wufeisoft,项目名称:ryf_mms2,代码行数:52,代码来源:DownloadFile.java


示例9: downloadXLSFileBase

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
private FileTransfer downloadXLSFileBase(List<String[]> list,
		String filename, String name) throws Exception {
	if (list == null) {
		list = new ArrayList<String[]>();
	}
	ByteArrayOutputStream buffer = new ByteArrayOutputStream();
	HSSFWorkbook wb = new HSSFWorkbook();
	HSSFSheet sheet = wb.createSheet();

	HSSFCellStyle cs = wb.createCellStyle();
	cs.setBorderBottom(HSSFCellStyle.BORDER_THIN);
	cs.setBorderLeft(HSSFCellStyle.BORDER_THIN);
	cs.setBorderRight(HSSFCellStyle.BORDER_THIN);
	cs.setBorderTop(HSSFCellStyle.BORDER_THIN);
	cs.setAlignment(HSSFCellStyle.ALIGN_CENTER);
	cs.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);

	int columnCount = list.get(0).length;
	sheet.setColumnWidth((short) 0, (short) 100);
	sheet.addMergedRegion(new Region((short) 0, (short) 0, (short) 0,
			(short) columnCount));
	for (int i = 1; i <= columnCount; i++) {
		sheet.setColumnWidth((short) i, (short) 4000);
	}
	// 表名
	HSSFRow row1 = sheet.createRow(0);
	HSSFCell cell = row1.createCell((short) 0);
	// cell.setEncoding((short) 0);
	cell.setCellValue(name);
	cell.setCellStyle(cs);
	row1.setHeight((short) 800);

	HSSFRow rows = null;
	for (int i = 0; i < list.size(); i++) {
		rows = sheet.createRow(i + 1);
		String cellDate[] = list.get(i);
		HSSFCell cells = null;
		for (int j = 0; j < cellDate.length; j++) {
			cells = rows.createCell((short) (j + 1));
			// cells.setEncoding((short) j);
			cells.setCellValue(cellDate[j]);
			cells.setCellStyle(cs);
		}
		if (i == 0) {
			rows.setHeight((short) 600);// 标题行宽
		}
	}
	wb.write(buffer);
	return new FileTransfer(filename, "application/x-xls", buffer
			.toByteArray());
}
 
开发者ID:wufeisoft,项目名称:ryf_mms2,代码行数:52,代码来源:DownloadFileService.java


示例10: exportMotionExcel

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
/**
 * 为退款经办下载表
 * 
 * @param outfile
 * @param list
 * @param name
 *            表名
 * @param s为每一格的宽度
 * @throws IOException
 */
public FileTransfer exportMotionExcel(List<String[]> list, String filename,
		String name, String[] s) throws Exception {

	ByteArrayOutputStream buffer = new ByteArrayOutputStream();
	HSSFWorkbook wb = new HSSFWorkbook();
	HSSFSheet sheet = wb.createSheet();
	HSSFCellStyle cs = wb.createCellStyle();
	// 设置表头的格式
	HSSFCellStyle cs1 = wb.createCellStyle();
	HSSFFont f1 = wb.createFont();
	f1.setFontHeightInPoints((short) 20);// 字体大小
	cs1.setFont(f1);
	cs1.setAlignment(HSSFCellStyle.ALIGN_CENTER);

	// 设置表中的格�?
	cs.setBorderBottom(HSSFCellStyle.BORDER_THIN);
	cs.setBorderLeft(HSSFCellStyle.BORDER_THIN);
	cs.setBorderRight(HSSFCellStyle.BORDER_THIN);
	cs.setBorderTop(HSSFCellStyle.BORDER_THIN);
	cs.setAlignment(HSSFCellStyle.ALIGN_CENTER);
	cs.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
	cs.setWrapText(true);// 自动换行
	// 将页面设�为横向打印模�?
	HSSFPrintSetup hps = sheet.getPrintSetup();
	hps.setLandscape(true); // 将页面设置为横向打印模式
	hps.setPaperSize(HSSFPrintSetup.A4_PAPERSIZE);// 为A4纸的大小

	int columnCount = list.get(0).length;
	// 表头那一列的的宽�?
	sheet.setColumnWidth((short) 0, (short) 10000);
	// 合并单元�?
	// sheet.addMergedRegion(new Region((short) 0, (short) 0, (short) 0,
	// (short) (columnCount-1)));
	// 根据String[] s来设定每一格的宽度
	for (int i = 0; i < columnCount; i++) {
		sheet.setColumnWidth((short) i, (Short.parseShort(s[i])));
	}
	// 表名
	HSSFRow row1 = sheet.createRow(0);
	HSSFCell cell = row1.createCell(0);
	cell.setCellValue(name);
	cell.setCellStyle(cs1);
	row1.setHeight((short) 800);
	sheet.addMergedRegion(new Region((short) 0, (short) 0, (short) 0,
			(short) (columnCount - 1)));

	HSSFRow rows = null;
	for (int i = 0; i < list.size(); i++) {
		rows = sheet.createRow(i + 1);
		String cellDate[] = list.get(i);
		HSSFCell cells = null;
		for (int j = 0; j < cellDate.length; j++) {
			cells = rows.createCell((short) (j));
			cells.setCellValue(cellDate[j]);
			cells.setCellStyle(cs);
		}
		if (i == 0) {
			rows.setHeight((short) 600);// 标题行宽�?
		}
	}
	wb.write(buffer);
	return new FileTransfer(filename, "application/x-xls", buffer
			.toByteArray());
}
 
开发者ID:wufeisoft,项目名称:ryf_mms2,代码行数:75,代码来源:DownloadFileService.java


示例11: exportToExcel

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
public ActionForward exportToExcel(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
        HttpServletResponse response) throws IOException {
    ParkingRequestSearch parkingRequestSearch = new ParkingRequestSearch();
    setSearchCriteria(request, parkingRequestSearch);
    parkingRequestSearch.doSearch();
    List<ParkingRequest> parkingRequestList = parkingRequestSearch.getSearchResult();
    StyledExcelSpreadsheet spreadsheet = new StyledExcelSpreadsheet("Pedidos_Parque", 15);
    spreadsheet.newHeaderRow();
    spreadsheet.addHeader("Categoria");
    spreadsheet.addHeader("Número");
    spreadsheet.addHeader("Nome", 9000);
    spreadsheet.addHeader("Estado");
    spreadsheet.addHeader("Data Pedido");
    spreadsheet.addHeader("Outras Informações", 6000);

    final ResourceBundle enumerationBundle = ResourceBundle.getBundle("resources.EnumerationResources", I18N.getLocale());
    for (ParkingRequest parkingRequest : parkingRequestList) {
        if (parkingRequest.getParkingParty().getParty().isPerson()) {
            Person person = (Person) parkingRequest.getParkingParty().getParty();
            spreadsheet.newRow();
            int firstRow = spreadsheet.getRow().getRowNum();
            spreadsheet.addCell(enumerationBundle.getString(parkingRequestSearch.getPartyClassification().name()));
            spreadsheet.addCell(parkingRequest.getParkingParty().getMostSignificantNumber());
            spreadsheet.addCell(person.getName());
            spreadsheet.addCell(enumerationBundle.getString(parkingRequest.getParkingRequestState().name()));
            spreadsheet.addDateTimeCell(parkingRequest.getCreationDate());
            if (!parkingRequest.getParkingParty().getDegreesInformation().isEmpty()) {
                Iterator<String> iterator = parkingRequest.getParkingParty().getDegreesInformation().iterator();
                String degreeInfo = iterator.next();
                spreadsheet.addCell(degreeInfo);
                while (iterator.hasNext()) {
                    spreadsheet.newRow();
                    degreeInfo = iterator.next();
                    spreadsheet.addCell(degreeInfo, 5);
                }
                int lastRow = firstRow + parkingRequest.getParkingParty().getDegreesInformation().size() - 1;
                if (firstRow != lastRow) {
                    for (int iter = 0; iter < 5; iter++) {
                        spreadsheet.getSheet().addMergedRegion(new Region(firstRow, (short) iter, lastRow, (short) iter));
                    }
                }
            }
        }
    }
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "attachment; filename=pedidos_parque.xls");
    final ServletOutputStream writer = response.getOutputStream();
    spreadsheet.getWorkbook().write(writer);
    writer.flush();
    response.flushBuffer();
    return null;
}
 
开发者ID:ist-dsi-archive,项目名称:fenix-parking,代码行数:53,代码来源:ParkingManagerDispatchAction.java


示例12: isNewMergedRegion

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
private static boolean isNewMergedRegion(Region region, Collection mergedRegions) {  
       return !mergedRegions.contains(region);  
   }
 
开发者ID:rmage,项目名称:gnvc-ims,代码行数:5,代码来源:MultiPageReportModel.java


示例13: createHeader

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
private void createHeader(final StyledExcelSpreadsheet spreadsheet, final Degree degree) {
    // title
    spreadsheet.newHeaderRow();
    spreadsheet.addCell(degree.getName(), spreadsheet.getExcelStyle().getTitleStyle());

    // empty row
    spreadsheet.newHeaderRow();

    // table header
    spreadsheet.newHeaderRow();
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.identification"));
    spreadsheet.addHeader(2, BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.degree.and.school"));
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.affinity"));
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.degreeNature"));
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.concludedUCs"));
    spreadsheet.addHeader(8, "");
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.approvedEctsRate"));
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.gradeRate"));
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.degreeTransfer.seriesCandidacyGrade"));
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.result"));

    spreadsheet.newHeaderRow();
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.number"));
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.name"));
    spreadsheet.addHeader(5, BundleUtil.getString(Bundle.APPLICATION, "label.number"));
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.gradeSum.abbr"));
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.approvedEcts"));
    spreadsheet.addHeader(BundleUtil.getString(Bundle.APPLICATION, "label.candidacy.enroledEcts"));

    // Id + Nº + Nome merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 0, 2, (short) 1));
    // Degree name merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 2, 3, (short) 2));
    // affinity merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 3, 3, (short) 3));
    // degreeNature merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 4, 3, (short) 4));
    // UCs merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 5, 2, (short) 7));
    // A merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 9, 3, (short) 9));
    // B merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 10, 3, (short) 10));
    // C merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 11, 3, (short) 11));
    // result merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 12, 3, (short) 12));
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:49,代码来源:DegreeTransferCandidacyProcessDA.java


示例14: createHeader

import org.apache.poi.hssf.util.Region; //导入依赖的package包/类
private void createHeader(final StyledExcelSpreadsheet spreadsheet, final Degree degree) {
    // title
    spreadsheet.newHeaderRow();
    spreadsheet.addCell(degree.getName(), spreadsheet.getExcelStyle().getTitleStyle());

    // empty row
    spreadsheet.newHeaderRow();

    // table header
    spreadsheet.newHeaderRow();
    spreadsheet.addHeader(getString("label.candidacy.identification"));
    spreadsheet.addHeader(2, getString("label.candidacy.degree.and.school"));
    spreadsheet.addHeader(getString("label.candidacy.affinity"));
    spreadsheet.addHeader(getString("label.candidacy.degreeNature"));
    spreadsheet.addHeader(getString("label.candidacy.concludedUCs"));
    spreadsheet.addHeader(8, "");
    spreadsheet.addHeader(getString("label.candidacy.approvedEctsRate"));
    spreadsheet.addHeader(getString("label.candidacy.gradeRate"));
    spreadsheet.addHeader(getString("label.candidacy.degreeChange.seriesCandidacyGrade"));
    spreadsheet.addHeader(getString("label.candidacy.result"));

    spreadsheet.newHeaderRow();
    spreadsheet.addHeader(getString("label.number"));
    spreadsheet.addHeader(getString("label.name"));
    spreadsheet.addHeader(5, getString("label.number"));
    spreadsheet.addHeader(getString("label.candidacy.gradeSum.abbr"));
    spreadsheet.addHeader(getString("label.candidacy.approvedEcts"));
    spreadsheet.addHeader(getString("label.candidacy.enroledEcts"));

    // Id + Nº + Nome merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 0, 2, (short) 1));
    // Degree name merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 2, 3, (short) 2));
    // affinity merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 3, 3, (short) 3));
    // degreeNature merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 4, 3, (short) 4));
    // UCs merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 5, 2, (short) 7));
    // A merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 9, 3, (short) 9));
    // B merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 10, 3, (short) 10));
    // C merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 11, 3, (short) 11));
    // result merge
    spreadsheet.getSheet().addMergedRegion(new Region(2, (short) 12, 3, (short) 12));
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:49,代码来源:DegreeChangeCandidacyProcessDA.java



注:本文中的org.apache.poi.hssf.util.Region类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HttpServer类代码示例发布时间:2022-05-23
下一篇:
Java Listeners类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap