public void InsertBlankRows(Worksheet wSheet, int rowIndex, int count) { Range range = ((Range)wSheet.Cells[rowIndex, 1]).EntireRow; for (int i = 0; i < count; i++) { range.Insert(XlInsertShiftDirection.xlShiftDown, XlInsertFormatOrigin.xlFormatFromRightOrBelow); range.ApplyOutlineStyles(); } }