excel4node
excel4node copied to clipboard
Cannot freeze columns
Describe the bug When trying to freeze a column, it totally hides that column from the sheet and is not accessible in any way.
To Reproduce
const xl = require('excel4node');
const wb = new xl.Workbook();
const ws = wb.addWorksheet('ColumnFreeze');
ws.cell(1, 1).string('First column should be frozen');
ws.cell(2, 1).string('First column should be frozen');
ws.cell(3, 1).string('First column should be frozen');
ws.cell(4, 1).string('First column should be frozen');
ws.cell(5, 1).string('First column should be frozen');
ws.cell(6, 1).string('First column should be frozen');
ws.cell(7, 1).string('First column should be frozen');
ws.cell(8, 1).string('First column should be frozen');
ws.cell(9, 1).string('First column should be frozen');
ws.cell(10, 1).string('First column should be frozen');
ws.column(1).freeze();
wb.write('FirstColumnFrozen.xlsx');
Expected behavior
ws.column(1).freeze()
should freeze the first column and rest of the columns should be scrollable
Environment (please complete the following information):
- OS: ProductName: Mac OS X ProductVersion: 10.15.5 BuildVersion: 19F101
- Node Version: v14.4.0
- excel4node Version: "excel4node": "^1.7.2"
- Application: Microsoft Excel for Mac v.16.30(27001300)
- Application Version (if applicable): v.16.30(27001300)
Additional context Add any other context about the problem here. Log entries related to the issue are good things.
Column 1 was freeze but width of the column is 0.00. Please set style of column 1. ws.column(1).setWidth(Math.max('First column should be frozen'.length));