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 display certain rows and/or columns in separate panes by splitting the worksheet into two or four parts. When working with large datasets, we need to see a few areas of the same worksheet at a time to compare different subsets of data. The split screen function can meet your needs.
To split up a worksheet into two or four parts, do the following:

To separate two areas of the spreadsheet vertically, select the column to the right of the column where you wish the split to appear and click the Split button in Excel.
It’s easy to split a worksheet vertically on columns programmatically with Aspose.Cells for Node.js via C++. We only need to select one cell in the top row as the active cell, then split with the Worksheet.split() method.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "Book1.xlsx");
// Instantiate a new Workbook.
const workbook = new AsposeCells.Workbook(filePath);
const sheet = workbook.getWorksheets().get(0);
// Sets C1 cell in the top row as the active cell.
sheet.setActiveCell("C1");
// Split worksheet vertically on columns
sheet.split();
To separate your Excel window horizontally, select the row below the row where you want the split to occur in Excel.
It’s easy to split a worksheet horizontally on rows programmatically with Aspose.Cells for Node.js via C++. We only need to select one cell in the left column as the active cell, then split with the Worksheet.split() method.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "Book1.xlsx");
// Instantiate a new Workbook.
const workbook = new AsposeCells.Workbook(filePath);
const sheet = workbook.getWorksheets().get(0);
// Sets A6 cell in the left column as the active cell.
sheet.setActiveCell("A6");
// Split worksheet horizontally on rows
sheet.split();
workbook.save("dest.xlsx");
To view four different sections of the same worksheet simultaneously, split your screen both vertically and horizontally in Excel.
It’s easy to split a worksheet into four parts programmatically with Aspose.Cells for Node.js via C++. We only need to select one cell that is not in the first row or column as the active cell, then split with the Worksheet.split() method.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "Book1.xlsx");
// Instantiate a new Workbook.
const workbook = new AsposeCells.Workbook(filePath);
const sheet = workbook.getWorksheets().get(0);
// Sets E6 cell as the active cell.
sheet.setActiveCell("E6");
// Split worksheet into four parts
sheet.split();
To remove the worksheet split, simply click the Split button again.
Aspose.Cells for Node.js via C++ provides a Worksheet.removeSplit() method to remove the split setting.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "Book1.xlsx");
// Instantiate a new Workbook.
const workbook = new AsposeCells.Workbook(filePath);
const sheet = workbook.getWorksheets().get(0);
// Remove split.
sheet.removeSplit();
// Split worksheet into four parts
sheet.split();
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.