Examples of createCellStyle()


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

        worksheet.createRow(2);

        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");
View Full Code Here

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

     
      OutputStream out = new FileOutputStream(sourcePath);
     
      HSSFWorkbook workbook = new HSSFWorkbook();
     
      HSSFCellStyle style = workbook.createCellStyle();
      // 设置这些样式
      style.setFillForegroundColor(HSSFColor.GREY_25_PERCENT.index);
      style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
      style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
      style.setBorderLeft(HSSFCellStyle.BORDER_THIN);
View Full Code Here

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

      font.setFontHeightInPoints((short) 12);
      font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
      // 把字体应用到当前的样式
      style.setFont(font);
     
      HSSFCellStyle styledata = workbook.createCellStyle();
      // 设置这些样式
      styledata.setBorderBottom(HSSFCellStyle.BORDER_THIN);
      styledata.setBorderLeft(HSSFCellStyle.BORDER_THIN);
      styledata.setBorderRight(HSSFCellStyle.BORDER_THIN);
      styledata.setBorderTop(HSSFCellStyle.BORDER_THIN);
View Full Code Here

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

      OutputStream out = new FileOutputStream(new File(sourcePath));

      HSSFWorkbook workbook = new HSSFWorkbook();

      HSSFCellStyle style = workbook.createCellStyle();
      // 设置这些样式
      style.setFillForegroundColor(HSSFColor.GREY_25_PERCENT.index);
      style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
      style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
      style.setBorderLeft(HSSFCellStyle.BORDER_THIN);
View Full Code Here

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

      font.setFontHeightInPoints((short) 12);
      font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
      // 把字体应用到当前的样式
      style.setFont(font);

      HSSFCellStyle styledata = workbook.createCellStyle();
      // 设置这些样式
      styledata.setBorderBottom(HSSFCellStyle.BORDER_THIN);
      styledata.setBorderLeft(HSSFCellStyle.BORDER_THIN);
      styledata.setBorderRight(HSSFCellStyle.BORDER_THIN);
      styledata.setBorderTop(HSSFCellStyle.BORDER_THIN);
View Full Code Here

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

     
      OutputStream out = new FileOutputStream(sourcePath);
     
      HSSFWorkbook workbook = new HSSFWorkbook();
     
      HSSFCellStyle style = workbook.createCellStyle();
      // 设置这些样式
      style.setFillForegroundColor(HSSFColor.GREY_25_PERCENT.index);
      style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
      style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
      style.setBorderLeft(HSSFCellStyle.BORDER_THIN);
View Full Code Here

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

      font.setFontHeightInPoints((short) 12);
      font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
      // 把字体应用到当前的样式
      style.setFont(font);
     
      HSSFCellStyle styledata = workbook.createCellStyle();
      // 设置这些样式
      styledata.setBorderBottom(HSSFCellStyle.BORDER_THIN);
      styledata.setBorderLeft(HSSFCellStyle.BORDER_THIN);
      styledata.setBorderRight(HSSFCellStyle.BORDER_THIN);
      styledata.setBorderTop(HSSFCellStyle.BORDER_THIN);
View Full Code Here

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

      }
    }
    final List<String> attributeIds = new ArrayList<String>(attributeIdSet);

    HSSFWorkbook wb = new HSSFWorkbook();
    final HSSFCellStyle localeCellStyle = wb.createCellStyle();
    localeCellStyle.setLocked(false);
    final HSSFSheet sheet = wb.createSheet("translation");
    createHeaderRow(sheet.createRow(0), locales, attributeIds);

    Exporter.export(ls, locales, new Callback<LocaleItem>() {
View Full Code Here

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

        assertEquals(IndexedColors.AUTOMATIC.getIndex(), style1.getFillBackgroundColor());
        assertNull(style1.getFillBackgroundXSSFColor());

        //compatibility with HSSF
        HSSFWorkbook wb2 = new HSSFWorkbook();
        HSSFCellStyle style2 = wb2.createCellStyle();
        assertEquals(style2.getFillBackgroundColor(), style1.getFillBackgroundColor());
        assertEquals(style2.getFillForegroundColor(), style1.getFillForegroundColor());
        assertEquals(style2.getFillPattern(), style1.getFillPattern());

        assertEquals(style2.getLeftBorderColor(), style1.getLeftBorderColor());
View Full Code Here

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

        assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb1));

        //compatibility with HSSF
        HSSFWorkbook wb2 = new HSSFWorkbook();
        HSSFCellStyle style2 = wb2.createCellStyle();
        assertEquals(style2.getFillBackgroundColor(), style1.getFillBackgroundColor());
        assertEquals(style2.getFillForegroundColor(), style1.getFillForegroundColor());
        assertEquals(style2.getFillPattern(), style1.getFillPattern());

        assertEquals(style2.getLeftBorderColor(), style1.getLeftBorderColor());
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.