写一行数据

@param row 行
@param rowData 一行的数据
@param styleSet 单元格样式集，包括日期等样式
@param isHeader 是否为标题行
178037
public static void writeRow(Row row, Iterable<?> rowData, StyleSet styleSet, boolean isHeader) {
		int i = 0;
		Cell cell;
		for (Object value : rowData) {
			cell = row.createCell(i);
			CellUtil.setCellValue(cell, value, styleSet, isHeader);
			i++;
		}
	}
1120957
public void setWidget (int row, int column, Widget widget, String style)
    {
        setWidget(row, column, widget);
        if (style != null) {
            getCellFormatter().setStyleName(row, column, style);
        }
    }
1131721
public static void applyRowCountHeader(MultivaluedMap<String, Object> headerParams, Query query, FutureRowCount rowCount) {
        if (rowCount != null) {
            try {
                headerParams.putSingle(REQ_TOTAL_COUNT_HEADER_NAME, rowCount.get());
            } catch (InterruptedException | ExecutionException e) {
                headerParams.putSingle(REQ_TOTAL_COUNT_HEADER_NAME, query.findCount());
            }
        }
    }
1109889
@Override
    public void setDataset(Instances dataset) {
        if(dataset instanceof InstancesHeader) {
            this.instanceHeader = (InstancesHeader) dataset;
        }else {
            this.instanceHeader = new InstancesHeader(dataset);
        }
    }
158758
public function addRow(array $row, Style $style = null)
    {
        if (!empty($row)) {
            $style = $style instanceof Style ? $style : $this->styler->getDefaultStyle();
            $this->styler->addStyle($style);
            $this->sheetFile->fwrite($this->sheet->addRow($row, $style));
        }
    }
762442
public static void readBySax(File file, int sheetIndex, RowHandler rowHandler) {
		BufferedInputStream in = null;
		try {
			in = FileUtil.getInputStream(file);
			readBySax(in, sheetIndex, rowHandler);
		} finally {
			IoUtil.close(in);
		}
	}
1091230
public void process(InputStream is) throws Exception
   {
      readHeader(is);
      readVersion(is);
      readTableData(readTableHeaders(is), is);
   }
445603
public void setText (int row, int column, String text, String style)
    {
        setText(row, column, text);
        if (style != null) {
            getCellFormatter().setStyleName(row, column, style);
        }
    }
991750
private <A> TableData<A> tableData(final ResultSet rs,
                                       final RowFunction<A> f)
        throws SQLException {

        final ResultSetMetaData meta = rs.getMetaData();
        final int c = meta.getColumnCount();
        final TableData<A> td = new TableData<A>();

        for (int p = 1; p <= c; p++) {
            final String n = meta.getColumnLabel(p);
            td.columns.add((n == null || "".equals(n)) ? "col" + p : n);
        } // end of for

        // First row
        td.rows.add(f.apply(rs));

        // Other row(s)
        while (rs.next()) {
            td.rows.add(f.apply(rs));
        } // end of if

        return td;
    }
749679
public function setStyle($style, $column1, $row1, $column2 = null, $row2 = null)
    {
        $this->sheet->getStyleByColumnAndRow($column1, $row1, $column2, $row2)->applyFromArray($style);
    }
445619
public void setText (int row, int column, Object text, int colSpan, String... styles)
    {
        setText(row, column, String.valueOf(text));
        if (colSpan > 0) {
            getFlexCellFormatter().setColSpan(row, column, colSpan);
        }
        setStyleNames(row, column, styles);
    }
557867
protected JavascriptVarBuilder encodeRow(final FacesContext context, final String rowKey,
                final JavascriptVarBuilder jsData, final JavascriptVarBuilder jsRowStyle,
                final JavascriptVarBuilder jsStyle, final JavascriptVarBuilder jsReadOnly, final Sheet sheet,
                final int rowIndex) throws IOException {
        // encode rowStyle (if any)
        final String rowStyleClass = sheet.getRowStyleClass();
        if (rowStyleClass == null) {
            jsRowStyle.appendArrayValue("null", false);
        }
        else {
            jsRowStyle.appendArrayValue(rowStyleClass, true);
        }

        // data is array of array of data
        final JavascriptVarBuilder jsRow = new JavascriptVarBuilder(null, false);
        int renderCol = 0;
        for (int col = 0; col < sheet.getColumns().size(); col++) {
            final SheetColumn column = sheet.getColumns().get(col);
            if (!column.isRendered()) {
                continue;
            }

            // render data value
            final String value = sheet.getRenderValueForCell(context, rowKey, col);
            jsRow.appendArrayValue(value, true);

            // custom style
            final String styleClass = column.getStyleClass();
            if (styleClass != null) {
                jsStyle.appendRowColProperty(rowIndex, renderCol, styleClass, true);
            }

            // read only per cell
            final boolean readOnly = column.isReadonlyCell();
            if (readOnly) {
                jsReadOnly.appendRowColProperty(rowIndex, renderCol, "true", true);
            }
            renderCol++;
        }
        // close row and append to jsData
        jsData.appendArrayValue(jsRow.closeVar().toString(), false);
        return jsData;
    }
715870
public void execute( Example example )
    {
        try
        {
            List<Fixture> fixtures = getFixtureList();

            Example headers = example.at( 0, 0 );
            if (columns == null) {
                columns = getHeaderColumns(headers);
            }

            if (example.hasSibling()) {

                RowFixtureSplitter splitter = new RowFixtureSplitter();

                splitter.split(example.at(1), fixtures, columns);

                for (RowFixture rowFixture : splitter.getMatch()) {
                    Example row = rowFixture.getRow();
                    executeRow(row.firstChild(), headers, rowFixture.getAdapter());

                    if (shouldStop(stats)) {
                        row.addChild().annotate(Annotations.stopped());
                        break;
                    }
                }

                if (mustProcessMissing() && canContinue(stats)) {
                    for (Example row : splitter.getMissing()) {
                        missingRow(row);

                        if (shouldStop(stats)) {
                            row.addChild().annotate(Annotations.stopped());
                            break;
                        }
                    }
                }

                if (mustProcessSurplus() && canContinue(stats)) {
                    for (Fixture adapter : splitter.getSurplus()) {
                        addSurplusRow(example, headers, adapter);

                        if (shouldStop(stats)) {
                            example.lastSibling().addChild().annotate(Annotations.stopped());
                            break;
                        }
                    }
                }
            }
        }
        catch (Exception e)
        {
            stats.exception();
            example.firstChild().annotate( exception( e ) );

			if (shouldStop( stats ))
			{
				example.addChild().annotate(Annotations.stopped());
			}
        }
    }
594909
void validateBlock(Row row)
  {
    if (! row.getDatabase().isValidate()) {
      return;
    }
    
    int rowHead = _rowHead;
    int blobTail = _blobTail;
        
    if (rowHead < blobTail) {
      throw new IllegalStateException(this 
                                      + " rowHead:" + rowHead
                                      + " blobTail:" + blobTail); 
    }
    
    int rowOffset = _rowHead;
    
    byte []buffer = _buffer;

    while (rowOffset < BLOCK_SIZE) {
      int code = buffer[rowOffset] & CODE_MASK;
      
      switch (code) {
      case INSERT:
        row.validate(buffer, rowOffset, rowHead, blobTail);
        break;
        
      case INSERT_DEAD:
      case REMOVE:
        break;
        
      default:
        throw new IllegalStateException(this + " " + rowOffset + " " + code + " unknown code");
      }
      
      int len = getLength(code, row);
      
      if (len < 0 || len + rowOffset > BLOCK_SIZE) {
        throw new IllegalStateException(this + " " + rowOffset + " code:" + code + " len:" + len + " invalid len");
      }
      
      rowOffset += len;
    }  
  }
341556
public int addText (Object text, int colSpan, String... styles)
    {
        int row = getRowCount();
        setText(row, 0, text, colSpan, styles);
        return row;
    }
289375
public static TabularResult of(final HeaderDefinition headerDefinition, final List<Row> rows) {
    ArgumentChecker.notNull(headerDefinition, "headerDefinition");
    ArgumentChecker.notNull(rows, "rows");
    return new TabularResult(headerDefinition, rows);
  }
302723
public static <T> Row writePerRow(Row row, T bean, List<String> properties, String dateFormat,
                                      CellStyle cellStyle) {
        Map<String, Object> mapBean = null;
        if (bean instanceof Map) {
            mapBean = (Map<String, Object>) bean;
        } else {
            mapBean = CommonUtils.toMap(bean);
        }
        if (mapBean == null) {
            return row;
        }
        for (int i = 0; i < properties.size(); i++) {
            if (mapBean.containsKey(properties.get(i))) {
                Cell cell = row.createCell(i);
                cell.setCellStyle(cellStyle);
                WriteExcelUtils.setCellValue(cell, mapBean.get(properties.get(i)), dateFormat);
            }

        }
        return row;
    }