In SpreadJS, each sheet area has several rows and columns. SpreadJS provides methods for you to customize the rows and columns.
Use the setRowCount and setColumnCount methods to change the number of rows or columns in each sheet area. In addition, you can use the addRows, addColumns, deleteRows, and deleteColumns methods to change the number of rows or columns in the viewport.
Each of the following lines could be used to change the row count of the sheet's viewport area.
If a row or column's resizeable property is false, it cannot be resized by user operations, but you can change its height or width directly by using code.
Use the setRowVisible and setColumnVisible methods to specify whether a row or column is displayed.
In the sheet's viewport area, when a row or column is automatically sized, its height or width will be determined by the content's length. Use the following code to set a row or column to auto fit:
SpreadJS also provides many methods to get useful information about a sheet's row or column, as illustrated in these lines of code.
var rowCount = sheet.getRowCount();
var columnCount = sheet.getColumnCount();
var cell = sheet.getCell(7, 7);
var cells = sheet.getCells(2, 2, 7, 7);
var rowHeight = sheet.getRowHeight(7);
var columnWidth = sheet.getColumnWidth(7);
SpreadJS provides the resizeZeroIndicator method to control whether to display double or single gridlines in the row or column header when the row height or column width is 0. The parameter is a ResizeZeroIndicator enumeration value.