Freeze Panes in Excel using Node.js

This tutorial guides on how to freeze panes in Excel using Node.js. It has the details to set the development environment, a list of steps to depict the program flow, and a sample code to freeze rows and columns in Excel using Node.js. It discusses different overloaded methods for use in the application.

Steps to Lock Panes in Excel using Node.js

  1. Set the IDE to use Aspose.Cells for Node.js via Java to freeze panes
  2. Load the source Excel file into the Workbook object for locking panes
  3. Select the target sheet and call the freezePanes() method
  4. Provide the reference cell for freeze position and total rows and columns to be frozen
  5. Save the output Excel file

These steps define the process to freeze the top row in Excel using Node.js, where you may freeze columns only or both rows and columns based on your application requirements. Invoke the freezePanes() method in the Worksheet class that takes the reference cell name or row/column information you want to freeze and the number of rows and columns at the top-left panes of the reference cell. Save the output into a stream or a file.

Code to Freeze Column on Excel using Node.js

This code demonstrates how to freeze panes in Excel using Node.js. It uses the freezePanes() method that takes information to define the reference cell and panes for freezing the cells. You may use the unFreezePanes() method to remove all the frozen panes from a sheet.

In this topic, we have learned to freeze multiple columns in Excel using Node.js, whereas you may also freeze rows using the sample code. To group rows in an Excel file, refer to the article on Group rows in Excel with Node.js.

 English