Hi Christian ,
Thank you for your interest in Essential XlsIO,
To insert a particular value at a cell range we need to do a rangemove operation to get the desired output and then insert the value. The following method will take a range, Inserted Value as input and shift the cells down.
private void MoveCellsDownAndInsert(IWorksheet sheet, IRange range, string value)
{
int iStartRow = range.LastRow;
int iStartCol = range.Column;
int iLastRow = sheet.UsedRange.End.Row;
int iLastCol = range.LastColumn;
IRange rangeToMove = sheet.Range[iStartRow, iStartCol, iLastRow, iLastCol];
rangeToMove.MoveTo(sheet.Range[range.Row + 1, range.Column]);
range.Value = value;
}
Here is a sample for your reference:
http://websamples.syncfusion.com/samples/XlsIO.Windows/F63484/main.htmKindly take a look and let us know if this helps.
Regards,
Ajish.