Package org.apache.poi.hssf.usermodel

Examples of org.apache.poi.hssf.usermodel.HSSFWorkbook.createFont()


        HSSFCell         c      = null;
        HSSFCellStyle    cs     = wb.createCellStyle();
        HSSFCellStyle    cs2    = wb.createCellStyle();
        HSSFCellStyle    cs3    = wb.createCellStyle();
        HSSFFont         f      = wb.createFont();
        HSSFFont         f2     = wb.createFont();

        f.setFontHeightInPoints(( short ) 12);
        f.setColor(( short ) 0xA);
        f.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        f2.setFontHeightInPoints(( short ) 10);
View Full Code Here


    @SuppressWarnings("deprecation")
    private HSSFWorkbook createWorkbook() {
        HSSFWorkbook wb = new HSSFWorkbook();

        HSSFFont font = wb.createFont();
        font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);

        HSSFSheet worksheet = wb.createSheet("Customers");
        worksheet.setColumnWidth(0, (20 * 256));
        worksheet.setColumnWidth(1, (30 * 256));
 
View Full Code Here

        row = worksheet.createRow(3);

        HSSFCellStyle style = wb.createCellStyle();
        style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
        font = wb.createFont();
        font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);

        value = new HSSFRichTextString("Name");
        value.applyFont(font);
        HSSFCell cell = row.createCell(0);
View Full Code Here

                        + executionSemester.getSemester());
        HSSFCellStyle normalStyle = spreadsheet.getExcelStyle().getValueStyle();
        normalStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);

        HSSFWorkbook wb = spreadsheet.getWorkbook();
        HSSFFont font = wb.createFont();
        font.setColor(HSSFColor.BLACK.index);
        font.setFontHeightInPoints((short) 8);
        HSSFCellStyle redStyle = wb.createCellStyle();
        redStyle.setFont(font);
        redStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
View Full Code Here

      tempCell.setCellValue(displayNames[j]);
    }
   
   
    HSSFCellStyle linkStyle = wb.createCellStyle();
    HSSFFont cellFont= wb.createFont();
    cellFont.setUnderline((byte) 1);
    cellFont.setColor(HSSFColor.BLUE.index);
    linkStyle.setFont(cellFont);

    boolean hasTag = false;
View Full Code Here

        HSSFRow          r      = null;
        HSSFCell         c      = null;
        HSSFCellStyle    cs     = wb.createCellStyle();
        HSSFCellStyle    cs2    = wb.createCellStyle();
        HSSFCellStyle    cs3    = wb.createCellStyle();
        HSSFFont         f      = wb.createFont();
        HSSFFont         f2     = wb.createFont();

        f.setFontHeightInPoints(( short ) 12);
        f.setColor(( short ) 0xA);
        f.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
View Full Code Here

        HSSFCell         c      = null;
        HSSFCellStyle    cs     = wb.createCellStyle();
        HSSFCellStyle    cs2    = wb.createCellStyle();
        HSSFCellStyle    cs3    = wb.createCellStyle();
        HSSFFont         f      = wb.createFont();
        HSSFFont         f2     = wb.createFont();

        f.setFontHeightInPoints(( short ) 12);
        f.setColor(( short ) 0xA);
        f.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        f2.setFontHeightInPoints(( short ) 10);
View Full Code Here

      // Create a row and put some cells in it. Rows are 0 based.
      Row row = sheet.createRow(1);

      // Create a new font and alter it.
      Font font = wb.createFont();
      font.setFontHeightInPoints((short)24);
      font.setFontName("Courier New");
      font.setItalic(true);
      font.setStrikeout(true);
View Full Code Here

      Sheet sheet = wb.createSheet("Accounts");
     
      int rowNum = 1;
      Row row = sheet.createRow(rowNum++);
     
      Font font = wb.createFont();
      font.setFontHeightInPoints((short)24);
      font.setFontName(FONT_TYPE);
      font.setColor(FONT_COLOR_TITLE);

      /***  Header *****/
 
View Full Code Here

              1, //first column (0-based)
              16  //last column  (0-based)
      ));

      /***  Body *****/
      font = wb.createFont();
      font.setFontHeightInPoints((short)12);
      font.setFontName(FONT_TYPE);
      font.setColor(FONT_COLOR);
     
      style = wb.createCellStyle();
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.