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

#453: Add new data validation: ListFormulaDataValidation. #454

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

civgio
Copy link

@civgio civgio commented Aug 5, 2024

Fixing the issue 453:: a new data validation is added: ListFormulaDataValidation.
This DataValidation allow to create a data validation with list type and with a formula value (to referrer a list, for example with INDIRECT formula).

In addition, it is possibility to set global visibility to a range when a named range is added.

Add the possibility to set global visibility to range when a named range is added.
@civgio
Copy link
Author

civgio commented Aug 14, 2024

@meiMingle @rzymek can you check the pull request and if you think the change makes sense, merge it into master?

Copy link
Collaborator

@rzymek rzymek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be nice if you'd add some tests covering those changes

public void write(Writer w) throws IOException {
w
.append("<dataValidation sqref=\"")
.append(range.toString())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnessesary .toString()

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I try to append the range without "toString", an error is return

*/
public Range setGlobalVisibility(boolean globalVisibility) {
this.globalVisibility = globalVisibility;
return this;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other setters return void. returning this here seems inconsistent

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand. I change it

@@ -44,6 +44,11 @@ public class Range implements Ref {
*/
private final int right;

/**
* Check about the Range visibility when a named range is added.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this comment confusing. Doesn't seem to turn on any "Check", but rather control the scope of this range (right?)

@civgio
Copy link
Author

civgio commented Aug 16, 2024

@rzymek thank you for your comments and your time.
I have fixed all your issues and I have added the tests.
I hope all is ok. If you have any other doubts, I am here.
Have a nice evening.

@civgio
Copy link
Author

civgio commented Sep 3, 2024

Please @rzymek, can you close the pull request if all is ok? Otherwise can you tell me what needs to be fix to complete the pull request?
Thank you so much for your support and availability

@rzymek rzymek merged commit 2b06134 into dhatim:master Sep 6, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants