DEV Community

IronSoftware
IronSoftware

Posted on • Originally published at ironsoftware.com

1 1

Freeze Panes in Excel

Use freeze panes to lock specific rows and columns in place, allowing them to remain visible while scrolling.

If you have a large table of data in Excel, it can be useful to freeze rows or columns. This way you can keep rows or columns visible while scrolling through the rest of the worksheet.

C#:

using System.Linq;
using IronXL;

WorkBook workbook = WorkBook.Load("test.xls");
WorkSheet sheet = workbook.WorkSheets.First();

//This is how we can freeze specified amount of columns and rows.They will be visible while scrolling the screen
sheet.CreateFreezePane(2,5);

//sheet.RemovePane() can be used to remove this frozen pane.

workbook.SaveAs("CreateFreezePanes.xls");
Enter fullscreen mode Exit fullscreen mode

VB:

Imports System.Linq
Imports IronXL

Private workbook As WorkBook = WorkBook.Load("test.xls")
Private sheet As WorkSheet = workbook.WorkSheets.First()

'This is how we can freeze specified amount of columns and rows.They will be visible while scrolling the screen
sheet.CreateFreezePane(2,5)

'sheet.RemovePane() can be used to remove this frozen pane.

workbook.SaveAs("CreateFreezePanes.xls")
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay