Skip to content
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

Upgraded to 3.4 - Cannot set property 'marked' of undefined #1027

Open
trueter opened this issue Nov 15, 2019 · 6 comments
Open

Upgraded to 3.4 - Cannot set property 'marked' of undefined #1027

trueter opened this issue Nov 15, 2019 · 6 comments

Comments

@trueter
Copy link

trueter commented Nov 15, 2019

Downgrading to 3.3.1 avoids the problem.
Difficult for me to say what exactly causes the problem as the error is raised only when writing the sheet to file.

(node:57552) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'marked' of undefined
    at .../node_modules/exceljs/lib/xlsx/xform/sheet/data-validations-xform.js:77:40
    at Array.map (<anonymous>)
    at .../node_modules/exceljs/lib/xlsx/xform/sheet/data-validations-xform.js:54:6)
    at .../node_modules/exceljs/lib/xlsx/xform/sheet/data-validations-xform.js:105:28)
    at .../node_modules/exceljs/lib/xlsx/xform/sheet/worksheet-xform.js:233:30)
    at .../node_modules/exceljs/lib/xlsx/xlsx.js:532:22
    at Array.forEach (<anonymous>)
    at .../node_modules/exceljs/lib/xlsx/xlsx.js:530:22)
    at .../node_modules/exceljs/lib/xlsx/xlsx.js:623:16)

@dadlian
Copy link

dadlian commented Dec 12, 2019

Thanks man this saved me from a nightmare meeting with a client!

@cooperbrown9
Copy link

How did you solve it?

@andersevenrud
Copy link

I had to downgrade to 3.3.1 in order for this to work again. The latest 3.7 has the same issue.

@Bene-Graham
Copy link
Contributor

I am also getting this issue.

It seems to occur when I do the following

worksheet.dataValidations.model["B2:B1048576"] = genderValidation;

In versions before 3.4 it would apply the validation to all cell in that range. In version 3.4 or greater I get an error.

If i manually iterate through each cell, it will work, but is very slow compared to how it was before.

@Siemienik
Copy link
Member

hmm.. it's a quite dizzy situation :) We haven't documentation about worksheet.dataValidations.model

I've found this PR which introduce this feature: #907

If anyone wanna add a description to docs I will be glad

@Siemienik
Copy link
Member

Siemienik commented Feb 5, 2020

I've some investigation about that and for me, these changes may be the best candidates:

image

v3.3.1...v3.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants