Shift few rows down

Hi Team,


i am using aspose.cells and i am having multiple sections in one excel template.
when data is getting inserted i want few column say from T to Z needs to be shifted down but not the full row. like we can do in excel. (see attached excel for reference.)
please let me know how can i do this?

Hi,


I think you may try to use Cells.InsertRange() overloaded method where you may specify your desired ShiftType accordingly.

See a sample code segment below:

CellArea ca = new CellArea();
ca.StartRow = startRow;
ca.StartColumn = startColumn;
ca.EndRow = endRow;
ca.EndColumn = endColumn;
worksheet.Cells.InsertRange(ca, ShiftType.Down);


Thank you.

Means there is no way i can do this from excel template itself?

in my attached template i have lots of section so how do i pass values for each section to my code?

Hi,


Well, I am afraid, you have to identify your sections by yourself in your code for the worksheet cells in your template file, you have to define the CellArea for your section to insert the Range accordingly to shift it down/right etc. To find out cells/data etc., you may try to use Find/Search option/feature to get the cells’ name, indexes or location, see the document for your reference:
http://www.aspose.com/docs/display/cellsnet/Find+or+Search+Data

Thanks for your understanding!