Package org.apache.poi.xssf.usermodel

Examples of org.apache.poi.xssf.usermodel.XSSFSheet.createRow()


        //"sampleid:wellid:samplealias:projectname"
        String sampleId = sampleinwell.split(":")[0];
        String wellId = sampleinwell.split(":")[1];
        String sampleAlias = sampleinwell.split(":")[2];
        String projectName = sampleinwell.split(":")[3];
        XSSFRow row = sheet.createRow(i);
        XSSFCell cellA = row.createCell(0);
        cellA.setCellValue(wellId);
        XSSFCell cellB = row.createCell(1);
        cellB.setCellValue(projectName);
        XSSFCell cellC = row.createCell(2);
View Full Code Here


    sheet.setColumnWidth(5, 50*255);   
    sheet.setColumnWidth(6, 15*255);   
    sheet.setColumnWidth(7, 20*255)
    sheet.setColumnWidth(8, 10*255);   
    //创建第一行
    XSSFRow row=sheet.createRow(0);
    //表头样式
        XSSFFont fonttitle=wb.createFont();
        fonttitle.setItalic(true);
        fonttitle.setFontName("微软雅黑");
        fonttitle.setBoldweight(XSSFFont.BOLDWEIGHT_BOLD);//粗体
View Full Code Here

    }
   
    // 写入内容行
    for (int i = 0; i < datas.size(); i++) {
      String[] rowvalue = datas.get(i);
      XSSFRow nextrow = sheet.createRow(sheet.getLastRowNum() + 1);// 创建一行
      for (int j = 0; j < rowvalue.length; j++) {
        XSSFCell cell = nextrow
            .createCell(j, XSSFCell.CELL_TYPE_STRING);
        cell.setCellValue(new XSSFRichTextString(rowvalue[j]));
        if (rowvalue[j].equals("Fail")) {
View Full Code Here

        CTPieSer ser = pieChart.getSerArray(0);

        // Series Text
        CTSerTx tx = ser.getTx();
        tx.getStrRef().getStrCache().getPtArray(0).setV(chartTitle);
        sheet.createRow(0).createCell(1).setCellValue(chartTitle);
        String titleRef = new CellReference(sheet.getSheetName(), 0, 1, true, true).formatAsString();
        tx.getStrRef().setF(titleRef);


        // Category Axis Data
View Full Code Here

            CTStrVal sVal = strData.addNewPt();
            sVal.setIdx(idx);
            sVal.setV(vals[0]);

            idx++;
            XSSFRow row = sheet.createRow(rownum++);
            row.createCell(0).setCellValue(vals[0]);
            row.createCell(1).setCellValue(Double.valueOf(vals[1]));
        }
        numData.getPtCount().setVal(idx);
        strData.getPtCount().setVal(idx);
View Full Code Here

        //&D == date
        oddHeader.setCenter("&B &E oddHeader     &D ");
       
        Footer evenFooter=sheet2.getEvenFooter();
        evenFooter.setRight("even footer &P");
        sheet2.createRow(10).createCell(0).setCellValue("Second sheet with an oddHeader and an evenFooter");

        for(int i=0;i<200;i=i+10){
            sheet2.createRow(i).createCell(0).setCellValue(123);
        }
       
View Full Code Here

        Footer evenFooter=sheet2.getEvenFooter();
        evenFooter.setRight("even footer &P");
        sheet2.createRow(10).createCell(0).setCellValue("Second sheet with an oddHeader and an evenFooter");

        for(int i=0;i<200;i=i+10){
            sheet2.createRow(i).createCell(0).setCellValue(123);
        }
       
        XSSFSheet sheet3 = (XSSFSheet)wb.createSheet("odd header- odd footer");
        sheet3.createRow(10).createCell(0).setCellValue("Third sheet with oddHeader and oddFooter");
        Header oddH=sheet3.getOddHeader();
View Full Code Here

        for(int i=0;i<200;i=i+10){
            sheet2.createRow(i).createCell(0).setCellValue(123);
        }
       
        XSSFSheet sheet3 = (XSSFSheet)wb.createSheet("odd header- odd footer");
        sheet3.createRow(10).createCell(0).setCellValue("Third sheet with oddHeader and oddFooter");
        Header oddH=sheet3.getOddHeader();
        //&C == centered
        oddH.setCenter("centered oddHeader");
        oddH.setLeft("left ");
        oddH.setRight("right ");
View Full Code Here

        CTPieSer ser = pieChart.getSerArray(0);

        // Series Text
        CTSerTx tx = ser.getTx();
        tx.getStrRef().getStrCache().getPtArray(0).setV(chartTitle);
        sheet.createRow(0).createCell(1).setCellValue(chartTitle);
        String titleRef = new CellReference(sheet.getSheetName(), 0, 1, true, true).formatAsString();
        tx.getStrRef().setF(titleRef);


        // Category Axis Data
View Full Code Here

            CTStrVal sVal = strData.addNewPt();
            sVal.setIdx(idx);
            sVal.setV(key);

            idx++;
            XSSFRow row = sheet.createRow(rownum++);
            row.createCell(0).setCellValue(key);
            row.createCell(1).setCellValue(val);
        }
        numData.getPtCount().setVal(idx);
        strData.getPtCount().setVal(idx);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.