Really what I want to do is copy an entire column. Why does the Cells.CopyColumn take 3 parameters? The first parameter is what is confusing (sourceCells) because it seems to me to copy a column I should just need to specify a source index and destination index. Seems to work when I call:
_cells.CopyColumn(_cells, 5, 6)
but is very unintuitive. Additionally, why is the 2nd parameter of the CreateRange method a byte? Why not just an int to be consistent?
The range copy below doesn't seem to work...
Range r1 = _worksheet.Cells.CreateRange(0, _worksheet.Cells[0, 5].Column, 171, 1);
Range r2 = _worksheet.Cells.CreateRange(0, _worksheet.Cells[0, 6].Column, 171, 1);
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex
at System.BitConverter.ToUInt16(Byte value, Int32 startIndex)
at Aspose.Excel.Record.?.?(? ?, Int32 ?, Byte ?)
at Aspose.Excel.Cell.Copy(Cell cell)
at Aspose.Excel.Range.Copy(Range range)