当前位置: 首页>>代码示例>>C#>>正文


C# Cell.getRow方法代码示例

本文整理汇总了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;
        }
开发者ID:advdig,项目名称:advgp2_administracion,代码行数:59,代码来源:SheetCopier.cs

示例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);
                }
        }
开发者ID:advdig,项目名称:advgp2_administracion,代码行数:20,代码来源:CellValue.cs

示例3: getCellReference

 /**
  * Gets the cell reference for the cell
  *
  * @param the cell
  */
 public static string getCellReference(Cell c)
 {
     return getCellReference(c.getColumn(),c.getRow());
 }
开发者ID:advdig,项目名称:advgp2_administracion,代码行数:9,代码来源:CellReferenceHelper.cs

示例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 + ")");
         */
         }
 }
开发者ID:advdig,项目名称:advgp2_administracion,代码行数:32,代码来源:SheetReader.cs


注:本文中的Cell.getRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。