-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function "eachCell" does not work as expected #15
Comments
I just saw your sources files and see next:
For me, it is not expected behaviour, because if we have strong order of properties it will be wrong in the output.
|
I guess the "each" functions could take an optional boolean argument like "includeEmpty" that would behave more like you want. I'll add it to the next release. |
The eachRow and eachCell functions now support an optional options argument that will git you the behaviour you need... worksheet.eachRow({ includeEmpty: true }, function(row, rowNumber) {
row.eachCell{ includeEmpty: true }, function(cell, colNumber) {
console.log("Cell " + colNumber + " on Row " + rowNumber + " = " + cell.value);
});
}); |
Great, Thank you! |
When I try use
eachCell
function it works strange. It seems that it dismiss null/undefined value or something like that.For example, if I have 30 columns and some of them equals ""(empty string in the file) then
Object.keys(parsedRow).length
expression can return 26.The text was updated successfully, but these errors were encountered: