Package org.apache.poi.xssf.usermodel

Examples of org.apache.poi.xssf.usermodel.XSSFCellStyle


    public XSSFHtmlHelper(XSSFWorkbook wb) {
        this.wb = wb;
    }

    public void colorStyles(CellStyle style, Formatter out) {
        XSSFCellStyle cs = (XSSFCellStyle) style;
        styleColor(out, "background-color", cs.getFillForegroundXSSFColor());
        styleColor(out, "text-color", cs.getFont().getXSSFColor());
    }
View Full Code Here


               else if ("str".equals(cellType))
                   nextDataType = xssfDataType.FORMULA;
               else if (cellStyleStr != null) {
                  // Number, but almost certainly with a special style or format
                   int styleIndex = Integer.parseInt(cellStyleStr);
                   XSSFCellStyle style = stylesTable.getStyleAt(styleIndex);
                   this.formatIndex = style.getDataFormat();
                   this.formatString = style.getDataFormatString();
                   if (this.formatString == null)
                       this.formatString = BuiltinFormats.getBuiltinFormat(this.formatIndex);
               }
           }
       }
View Full Code Here

    // 0 is the empty default
    if(xfs.get(idx).getXfId() > 0) {
      styleXfId = (int) xfs.get(idx).getXfId();
    }

    return new XSSFCellStyle(idx, styleXfId, this, theme);
  }
View Full Code Here

    xf.setFillId(0);
    xf.setBorderId(0);
    xf.setXfId(0);
    int xfSize = styleXfs.size();
    int indexXf = putCellXf(xf);
    return new XSSFCellStyle(indexXf - 1, xfSize - 1, this, theme);
  }
View Full Code Here

        CTCol col_2 = ctWorksheet.getColsArray(0).addNewCol();
        col_2.setMin(10);
        col_2.setMax(12);
        col_2.setStyle(1);
        assertEquals(1, columnHelper.getColDefaultStyle(11));
        XSSFCellStyle cellStyle = new XSSFCellStyle(0, 0, stylesTable, null);
        columnHelper.setColDefaultStyle(11, cellStyle);
        assertEquals(0, col_2.getStyle());
        assertEquals(1, columnHelper.getColDefaultStyle(10));
    }
View Full Code Here

    // 0 is the empty default
    if(xfs.get(idx).getXfId() > 0) {
      styleXfId = (int) xfs.get(idx).getXfId();
    }

    return new XSSFCellStyle(idx, styleXfId, this, theme);
  }
View Full Code Here

    xf.setFillId(0);
    xf.setBorderId(0);
    xf.setXfId(0);
    int xfSize = styleXfs.size();
    int indexXf = putCellXf(xf);
    return new XSSFCellStyle(indexXf - 1, xfSize - 1, this, theme);
  }
View Full Code Here

           else if ("str".equals(cellType))
               nextDataType = xssfDataType.FORMULA;
           else if (cellStyleStr != null) {
              // Number, but almost certainly with a special style or format
               int styleIndex = Integer.parseInt(cellStyleStr);
               XSSFCellStyle style = stylesTable.getStyleAt(styleIndex);
               this.formatIndex = style.getDataFormat();
               this.formatString = style.getDataFormatString();
               if (this.formatString == null)
                   this.formatString = BuiltinFormats.getBuiltinFormat(this.formatIndex);
           }
       }
   }
View Full Code Here

    // 0 is the empty default
    if(xfs.get(idx).getXfId() > 0) {
      styleXfId = (int) xfs.get(idx).getXfId();
    }

    return new XSSFCellStyle(idx, styleXfId, this, theme);
  }
View Full Code Here

    xf.setFillId(0);
    xf.setBorderId(0);
    xf.setXfId(0);
    int xfSize = styleXfs.size();
    int indexXf = putCellXf(xf);
    return new XSSFCellStyle(indexXf - 1, xfSize - 1, this, theme);
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.xssf.usermodel.XSSFCellStyle

Copyright © 2018 www.massapicom. 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.