Package org.apache.poi.xssf.usermodel

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.createCellStyle()


          //4.2 text
          row.createCell(1).setCellValue("Text");
       
          //4.3 date cell
          CreationHelper createHelper = wb.getCreationHelper();
          CellStyle cellStyle = wb.createCellStyle();
          cellStyle.setDataFormat(createHelper.createDataFormat().getFormat("m/d/yy h:mm"));
          Cell cell = row.createCell(2);
          cell.setCellValue(new Date());
          cell.setCellStyle(cellStyle);
 
View Full Code Here


    Font font = wb.createFont();
    font.setBoldweight(Font.BOLDWEIGHT_BOLD);  
//-------------------------------sheet1-----------------------------------------------------   
    Row firstrow = sheet1.createRow((short) 0)
    CellStyle firstrow_style = wb.createCellStyle();
    firstrow_style.setFillForegroundColor(IndexedColors.LIGHT_CORNFLOWER_BLUE.getIndex());
    firstrow_style.setFillPattern(CellStyle.SOLID_FOREGROUND);
    firstrow_style.setFont(font);
   
    //Border for first row
View Full Code Here

    Cell firstRowCell1 = firstrow.createCell((short) 1);
    firstRowCell1.setCellValue("Count");
    firstRowCell1.setCellStyle(firstrow_style);
   
    //Border for row
    CellStyle row_style = wb.createCellStyle();
    row_style.setBorderBottom( CellStyle.BORDER_THIN );
    row_style.setBorderLeft( CellStyle.BORDER_THIN );
    row_style.setBorderRight( CellStyle.BORDER_THIN );
    row_style.setBorderTop( CellStyle.BORDER_THIN );
    row_style.setBorderLeft( CellStyle.BORDER_THIN );
View Full Code Here

    Font font = wb.createFont();
    font.setBoldweight(Font.BOLDWEIGHT_BOLD);  
//-------------------------------sheet1-----------------------------------------------------   
    Row firstrow = sheet1.createRow((short) 0)
    CellStyle firstrow_style = wb.createCellStyle();
    firstrow_style.setFillForegroundColor(IndexedColors.LIGHT_CORNFLOWER_BLUE.getIndex());
    firstrow_style.setFillPattern(CellStyle.SOLID_FOREGROUND);
    firstrow_style.setFont(font);
   
    //Border for first row
View Full Code Here

    Cell firstRowCell1 = firstrow.createCell((short) 1);
    firstRowCell1.setCellValue("Count");
    firstRowCell1.setCellStyle(firstrow_style);
   
    //Border for row
    CellStyle row_style = wb.createCellStyle();
    row_style.setBorderBottom( CellStyle.BORDER_THIN );
    row_style.setBorderLeft( CellStyle.BORDER_THIN );
    row_style.setBorderRight( CellStyle.BORDER_THIN );
    row_style.setBorderTop( CellStyle.BORDER_THIN );
    row_style.setBorderLeft( CellStyle.BORDER_THIN );
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.