The SpreadJS sheet consists of four areas: corner, rowHeader, colHeader, and viewport. The viewport is the bottom right area of the sheet.
The sheet's frozen rows and columns prevent rows and columns from scrolling in the sheet's viewport area using a frozen line divider. The frozen lines also divide the viewport into several row and column viewports.
You can set at most four different frozen lines in a sheet. Doing so will divide the current viewport into three row viewports and three column viewports. The following code creates four frozen lines in a sheet:
//set row frozenline and column frozenline.
You can customize the frozenLine's color, as shown in the following code:
sheet.options.frozenlineColor = 'red';
SpreadJS provides methods for you to get the information for each viewport, such as the width, height, topRow, and so on.
Supposing you have set a frozen row line and a frozen column line in a sheet. The original viewport has been divided into three row viewports, and the viewport indexes are 0, 1, and 2. You could then use the following code to get the information for the second viewport: