Answer the question
In order to leave comments, you need to log in
Incorrect creation of .xls column width when using node.js and exel4node module?
In the project I use the excel4node module for node.js
The task is to set the width of the columns. Writing :
var width = 50;
ws.column(3).setWidth(width);
setWidth(w) {
if (parseInt(w) === w) {
this.colWidth = w;
this.customWidth = true;
} else {
throw new TypeError('Column width must be a positive integer');
}
return this;
}
parseInt(string, radix);
Answer the question
In order to leave comments, you need to log in
never figured out what the problem is. decided as follows. in Column.js (in the sources of the exel4Node module) in setWidth disabled the parseInt() check (it is not correct at all, because it does not take into account a number of situations). And I set the values of the columns empirically - by picking up the value.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question