本文整理汇总了C#中Cell.getRow方法的典型用法代码示例。如果您正苦于以下问题:C# Cell.getRow方法的具体用法?C# Cell.getRow怎么用?C# Cell.getRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cell
的用法示例。
在下文中一共展示了Cell.getRow方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: deepCopyCell
/**
* Performs a deep copy of the specified cell, handling the cell format
*
* @param cell the cell to copy
*/
private WritableCell deepCopyCell(Cell cell)
{
WritableCell c = shallowCopyCell(cell);
if (c == null)
{
return c;
}
if (c is ReadFormulaRecord)
{
ReadFormulaRecord rfr = (ReadFormulaRecord)c;
bool crossSheetReference = !rfr.handleImportedCellReferences
(fromSheet.getWorkbook(),
fromSheet.getWorkbook(),
workbookSettings);
if (crossSheetReference)
{
try
{
//logger.warn("Formula " + rfr.getFormula() +
// " in cell " +
// CellReferenceHelper.getCellReference(cell.getColumn(),
// cell.getRow()) +
// " cannot be imported because it references another " +
// " sheet from the source workbook");
}
catch (FormulaException e)
{
//logger.warn("Formula in cell " +
// CellReferenceHelper.getCellReference(cell.getColumn(),
// cell.getRow()) +
// " cannot be imported: " + e.Message);
}
// Create a new error formula and add it instead
c = new Formula(cell.getColumn(), cell.getRow(), "\"ERROR\"");
}
}
// Copy the cell format
CellFormat cf = c.getCellFormat();
int index = ((XFRecord)cf).getXFIndex();
WritableCellFormat wcf = null;
if (!xfRecords.ContainsKey(index))
wcf = copyCellFormat(cf);
else
wcf = xfRecords[index];
c.setCellFormat(wcf);
return c;
}
示例2: CellValue
/**
* Constructor used when creating a writable cell from a read-only cell
* (when copying a workbook)
*
* @param c the cell to clone
* @param t the type of this cell
*/
protected CellValue(Type t, Cell c)
: this(t, c.getColumn(), c.getRow())
{
copied = true;
format = (XFRecord)c.getCellFormat();
if (c.getCellFeatures() != null)
{
features = new WritableCellFeatures(c.getCellFeatures());
features.setWritableCell(this);
}
}
示例3: getCellReference
/**
* Gets the cell reference for the cell
*
* @param the cell
*/
public static string getCellReference(Cell c)
{
return getCellReference(c.getColumn(),c.getRow());
}
示例4: addCell
/**
* Adds the cell to the array
*
* @param cell the cell to add
*/
private void addCell(Cell cell)
{
// Sometimes multiple cells (eg. MULBLANK) can exceed the
// column/row boundaries. Ignore these
if (cell.getRow() < numRows && cell.getColumn() < numCols)
{
if (cells[cell.getRow(),cell.getColumn()] != null)
{
StringBuilder sb = new StringBuilder();
CellReferenceHelper.getCellReference
(cell.getColumn(), cell.getRow(), sb);
//logger.warn("Cell " + sb.ToString() + " already contains data");
}
cells[cell.getRow(),cell.getColumn()] = cell;
}
else
{
outOfBoundsCells.Add(cell);
/*
logger.warn("Cell " +
CellReferenceHelper.getCellReference
(cell.getColumn(), cell.getRow()) +
" exceeds defined cell boundaries in Dimension record " +
"(" + numCols + "x" + numRows + ")");
*/
}
}