Insert New Rows & Columns
using IronXL;

// Load existing spreadsheet
WorkBook workBook = WorkBook.Load("sample.xlsx");
WorkSheet workSheet = workBook.DefaultWorkSheet;

// Add a row before row 1
workSheet.InsertRow(0);

// Insert multiple rows before row 4
workSheet.InsertRows(3, 3);

// Add a column before column A
workSheet.InsertColumn(0);

// Insert multiple columns before column F
workSheet.InsertColumns(5, 2);

workBook.SaveAs("addRowAndColumn.xlsx");
NuGet Download
PM > Install-Package IronXL.Excel
Insert New Rows & Columns

Insert New Rows & Columns

IronXL library allows the ability to insert single & multiple rows and columns in C# code without using Office Interop.

Insert Row

The InsertRow and InsertRows methods enable adding brand-new rows. Using these methods will add row(s) before the specified index position.

Insert Column

Use InsertColumn and InsertColumns methods to add column(s) before the specified index position.

Please note that all the index positions mentioned above follow zero-based indexing.

Learn How to Add Rows & Columns in Excel with C#
View on GitHub

Ready to Get Started?

Nuget Downloads 2,362,812Version:2026.11just released