Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
In this article, we will learn how to freeze panes. When you have a huge amount of data under a common heading, you are unable to see the heading when you scroll down the worksheet. Each record contains many data points. You can freeze panes so that you can see the frozen portion even when the rest of the data is scrolled. You can easily see headers in the top rows or first columns. Freezing and unfreezing panes only changes the view of the data without changing the data itself.


As you can see, the 1st row and column A are frozen, the second row is 2, and the second visible column is D.
Freeze panes let you view large data without having to keep track of row or column labels.
It’s simple to freeze panes with Aspose.Cells for C++. Please use the Worksheet.FreezePanes method to freeze panes at the selected cell.
Worksheet.FreezePanes() method.#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// Instantiate a new Workbook
U16String inputFilePath(u"Freeze.xlsx");
Workbook workbook(inputFilePath);
// Freeze panes at the cell B2
WorksheetCollection sheets = workbook.GetWorksheets();
sheets.Get(0).FreezePanes(u"B2", 1, 1);
// Save the file
U16String outputFilePath(u"frozen.xlsx");
workbook.Save(outputFilePath);
std::cout << "Panes frozen successfully!" << std::endl;
Aspose::Cells::Cleanup();
}
Attached sample source Excel file.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.