gpt4 book ai didi

jxl.write.WritableCell类的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 06:53:05 26 4
gpt4 key购买 nike

本文整理了Java中jxl.write.WritableCell类的一些代码示例,展示了WritableCell类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WritableCell类的具体详情如下:
包路径:jxl.write.WritableCell
类名称:WritableCell

WritableCell介绍

[英]The interface for all writable cells
[中]所有可写单元的接口

代码示例

代码示例来源:origin: org.jxls/jxls-jexcel

private void updateCellStyle(WritableCell cell) {
//        WritableCellFormat writableCellFormat = new WritableCellFormat(cellFormat);
//        cell.setCellFormat(writableCellFormat);
    cell.setCellFormat(cellFormat);
  }

代码示例来源:origin: com.hynnet/jxl

if (c.getWritableCellFeatures() == null ||
  !c.getWritableCellFeatures().hasDataValidation())
       CellReferenceHelper.getCellReference(c.getColumn(), 
                          c.getRow()) + 
       " as it has no data validation");
 return;
int startColumn = c.getColumn();
int startRow = c.getRow();
int endRow = Math.min(numRows - 1, startRow + extraRows);
for (int y = startRow; y <= endRow; y++)
     c2.getWritableCellFeatures() != null &&
     c2.getWritableCellFeatures().hasDataValidation())
WritableCellFeatures sourceDataValidation = c.getWritableCellFeatures();
sourceDataValidation.getDVParser().extendCellValidation(extraCols, 
                            extraRows);
   WritableCellFeatures validation = c2.getWritableCellFeatures();
    c2.setCellFeatures(validation);

代码示例来源:origin: net.sourceforge.jexcelapi/jxl

if (c.getCellFeatures() != null &
  c.getCellFeatures().hasDataValidation())

代码示例来源:origin: net.sourceforge.jexcelapi/jxl

WritableFont.BOLD);
cf = new WritableCellFormat(bold);
cell.setCellFormat(cf);
                     UnderlineStyle.SINGLE);
cf = new WritableCellFormat(underline);
cell.setCellFormat(cf);
WritableFont tenpoint = new WritableFont(WritableFont.ARIAL, 10);
cf = new WritableCellFormat(tenpoint);
cell.setCellFormat(cf);
if (cell.getType() == CellType.LABEL)
NumberFormat sevendps = new NumberFormat("#.0000000");
cf = new WritableCellFormat(sevendps);
cell.setCellFormat(cf);
NumberFormat exp4 = new NumberFormat("0.####E0");
cf = new WritableCellFormat(exp4);
cell.setCellFormat(cf);
cell.setCellFormat(WritableWorkbook.NORMAL_STYLE);
if (cell.getType() == CellType.NUMBER)
if (cell.getType() == CellType.NUMBER)
DateFormat df = new DateFormat("dd MMM yyyy HH:mm:ss");

代码示例来源:origin: com.hynnet/jxl

throws WriteException, RowsExceededException
if (cell.getType() == CellType.EMPTY)
 if (cell != null && cell.getCellFormat() == null)
int row = cell.getRow();
RowRecord rowrec = getRowRecord(row);
if (cell.getCellFeatures() != null &&
  cell.getCellFeatures().hasDataValidation() && 
  curSharedValidation)
 WritableCellFeatures wcf = cell.getWritableCellFeatures();
  cell.setCellFeatures(wcf);

代码示例来源:origin: davidpelfree/sjxlsx

WritableCellFormat newFormat = c.getCellFormat() == null ? new WritableCellFormat()
    : new WritableCellFormat(c.getCellFormat());
if (format != null && (format.getBackColor() != -1 || format.getForeColor() != -1)) {
  if (format.getBackColor() != -1) {
c.setCellFormat(newFormat);

代码示例来源:origin: net.sourceforge.jexcelapi/jxl

throws WriteException
WritableCellFeatures wcf = cell.getWritableCellFeatures();
if (wcf == null ||
  !wcf.hasDataValidation())
 if (cell.getColumn() != dvp.getFirstColumn() ||
   cell.getRow() != dvp.getFirstRow())

代码示例来源:origin: org.jxls/jxls-jexcel

public static void setCellComment(WritableCell cell, String commentText){
  WritableCellFeatures features = new WritableCellFeatures();
  features.setComment(commentText);
  cell.setCellFeatures(features);
}

代码示例来源:origin: net.sourceforge.jexcelapi/jxl

if (wc.getType() == CellType.LABEL)

代码示例来源:origin: com.hynnet/jxl

WritableFont.BOLD);
cf = new WritableCellFormat(bold);
cell.setCellFormat(cf);
                     UnderlineStyle.SINGLE);
cf = new WritableCellFormat(underline);
cell.setCellFormat(cf);
WritableFont tenpoint = new WritableFont(WritableFont.ARIAL, 10);
cf = new WritableCellFormat(tenpoint);
cell.setCellFormat(cf);
if (cell.getType() == CellType.LABEL)
NumberFormat sevendps = new NumberFormat("#.0000000");
cf = new WritableCellFormat(sevendps);
cell.setCellFormat(cf);
NumberFormat exp4 = new NumberFormat("0.####E0");
cf = new WritableCellFormat(exp4);
cell.setCellFormat(cf);
cell.setCellFormat(WritableWorkbook.NORMAL_STYLE);
if (cell.getType() == CellType.NUMBER)
if (cell.getType() == CellType.NUMBER)
DateFormat df = new DateFormat("dd MMM yyyy HH:mm:ss");

代码示例来源:origin: net.sourceforge.jexcelapi/jxl

throws WriteException, RowsExceededException
if (cell.getType() == CellType.EMPTY)
 if (cell != null && cell.getCellFormat() == null)
int row = cell.getRow();
RowRecord rowrec = getRowRecord(row);
if (cell.getCellFeatures() != null &&
  cell.getCellFeatures().hasDataValidation() && 
  curSharedValidation)
 WritableCellFeatures wcf = cell.getWritableCellFeatures();
  cell.setCellFeatures(wcf);

代码示例来源:origin: net.sourceforge.jexcelapi/jxl

CellFormat cf = c.getCellFormat();
int index = ( (XFRecord) cf).getXFIndex();
WritableCellFormat wcf = (WritableCellFormat) 
c.setCellFormat(wcf);

代码示例来源:origin: com.hynnet/jxl

throws WriteException
WritableCellFeatures wcf = cell.getWritableCellFeatures();
if (wcf == null ||
  !wcf.hasDataValidation())
 if (cell.getColumn() != dvp.getFirstColumn() ||
   cell.getRow() != dvp.getFirstRow())

代码示例来源:origin: org.jxls/jxls-jexcel

public static void setCellComment(WritableCell cell, String commentText, double width, double height){
  WritableCellFeatures features = new WritableCellFeatures();
  features.setComment(commentText, width, height);
  cell.setCellFeatures(features);
}

代码示例来源:origin: com.hynnet/jxl

if (wc.getType() == CellType.LABEL)

代码示例来源:origin: net.sourceforge.jexcelapi/jxl

CellFormat cf = c.getCellFormat();
int index = ( (XFRecord) cf).getXFIndex();
WritableCellFormat wcf = (WritableCellFormat) 
c.setCellFormat(wcf);

代码示例来源:origin: org.icefaces/icefaces-compat

cell.setCellFormat(format);

代码示例来源:origin: net.sourceforge.jexcelapi/jxl

if (c.getWritableCellFeatures() == null ||
  !c.getWritableCellFeatures().hasDataValidation())
       CellReferenceHelper.getCellReference(c.getColumn(), 
                          c.getRow()) + 
       " as it has no data validation");
 return;
int startColumn = c.getColumn();
int startRow = c.getRow();
int endRow = Math.min(numRows - 1, startRow + extraRows);
for (int y = startRow; y <= endRow; y++)
     c2.getWritableCellFeatures() != null &&
     c2.getWritableCellFeatures().hasDataValidation())
WritableCellFeatures sourceDataValidation = c.getWritableCellFeatures();
sourceDataValidation.getDVParser().extendCellValidation(extraCols, 
                            extraRows);
   WritableCellFeatures validation = c2.getWritableCellFeatures();
    c2.setCellFeatures(validation);

代码示例来源:origin: org.jxls/jxls-jexcel

private void updateCellGeneralInfo(WritableCell cell) {
  if( cellFeatures != null ){
    WritableCellFeatures writableCellFeatures = new WritableCellFeatures(cellFeatures);
    if( JexcelUtil.isJxComment(getCellComment()) ){
      writableCellFeatures.removeComment();
    }
    cell.setCellFeatures(writableCellFeatures);
  }
}

代码示例来源:origin: com.hynnet/jxl

if (c.getCellFeatures() != null &
  c.getCellFeatures().hasDataValidation())

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com