IRONSOFTWAREHOME
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");
Imports IronXL

' Load existing spreadsheet
Dim workBook As WorkBook = WorkBook.Load("sample.xlsx")
Dim workSheet As 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,280,941Version:2026.10just released

Key in blue circle

Get your free 30-day Trial Key instantly

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronXL
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get a Quote, No Obligation
Your details will always be kept confidential.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Trusted by Millions of Engineers Worldwide
Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.10

PM > Install-Package IronXL.Excel
nuget.org/packages/IronXL.Excel/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronXL"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.10

  1. Download and unzip IronXL to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronXL.dll"

Licenses from $999