Exemplo n.º 1
0
        static void Main(string[] args)
        {
            InitializeWorkbook();

            ISheet s = hssfworkbook.GetSheetAt(0);

            ICell cell = s.GetRow(4).GetCell(1);

            cell.CopyCellTo(3); //copy B5 to D5

            IRow c = s.GetRow(3);

            c.CopyCell(0, 1);   //copy A4 to B4

            s.CopyRow(0, 1);    //copy row A to row B, original row B will be moved to row C automatically
            WriteToFile();
        }
Exemplo n.º 2
0
        public ICell GetCell(int row, int column, bool copyBeforeColumnCell = false)
        {
            IRow r = _sheet[row];

            if (!copyBeforeColumnCell)
            {
                if (r.IsNull())
                {
                    return(null);
                }
            }
            else
            {
                if (column - 1 >= 0)
                {
                    r.CopyCell(column - 1, column);
                }
            }

            return(r[column]);
        }
Exemplo n.º 3
0
 public ICell CopyCell(int sourceIndex, int targetIndex)
 {
     return(_row.CopyCell(sourceIndex, targetIndex));
 }