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

adding 2nd data validation list after load #277

Closed
JanMarvin opened this issue Jul 17, 2022 · 1 comment
Closed

adding 2nd data validation list after load #277

JanMarvin opened this issue Jul 17, 2022 · 1 comment
Labels
bug 🐛 Something isn't working

Comments

@JanMarvin
Copy link
Owner

When saving, wb$dataValidationsLst is moved to ext. Upon loading it is not moved to dataValidationsLst but remains in extLst. Hence we need to check if creating another entry in dataValidationsLst and saving again properly merges or creates broken xlsx output. Preferably the list is not silently moved from one entry to another, but remains at a single spot. E.g. load it, move the node around and remove the node in the extLst.

This will be broken. Has one extLst, but two "<ext xmlns:x14 ...>" entries.

 wb2$add_data_validation("Sheet 3", col = 2, rows = 2:31, type = "list",
                         value = "'Sheet 4'!$A$1:$A$10")
@JanMarvin JanMarvin added the bug 🐛 Something isn't working label Jul 17, 2022
@JanMarvin
Copy link
Owner Author

This is one of the bugs that Excel cannot recover from. E.g. it complains but gives up and you cannot see whatever was in the file.

JanMarvin added a commit that referenced this issue Aug 6, 2022
Certain data validation is an x14 extension. Previously, it was added to dataValdiationLst and moved to extLst when saving. When loading, it remained in extLst. This caused problems when a second dataValidationsLst entry was added. Now, dataValidationsLst is skipped completely. Instead, we write directly to extLst using the approach used with sparklines.
JanMarvin added a commit that referenced this issue Aug 7, 2022
Certain data validation is an x14 extension. Previously, it was added to dataValdiationLst and moved to extLst when saving. When loading, it remained in extLst. This caused problems when a second dataValidationsLst entry was added. Now, dataValidationsLst is skipped completely. Instead, we write directly to extLst using the approach used with sparklines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant