Hi there, I’m a little stuck on something and could use some help please.
Given a source cell, I’d like to be able to insert another cell to the right, and copy over everything from the source cell.
Basically, I want something like the functionality of InsertColumn and CopyColumn but without inserting an entire column, just a cell to the right. My experiments with InsertRange and Cell.Copy don’t seem to be working.
CellArea ca = new CellArea();
ca.StartColumn = Cell.Column;
ca.EndColumn = Cell.Column + 1;
ca.StartRow = Cell.Row;
ca.EndRow = Cell.Row;Cell.Worksheet.Cells.InsertRange(ca, ShiftType.Right);
Cell.Copy(Cell.Worksheet.Cells[Cell.Row, Cell.Column + 1]);
Hope that makes sense…