mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #393] A bug in documentation #314
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#314
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Horseechen on GitHub (Feb 14, 2023).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/393
There is a confusing error in the 7th example in the following code(http://libxlsxwriter.github.io/data_validate_8c-example.html ):
data_validation->validateshould be assigned with a value ofLXW_VALIDATION_TYPE_LIST_FORMULArather thanLXW_VALIDATION_TYPE_LIST.original code:
it should be
@jmcnamara commented on GitHub (Feb 14, 2023):
The member name for
data_validation->value_formulais a little bit confusing but the example is correct. The data validation list comes from a range in the spreadsheet:Probably the member should be called something like
value_rangeorvalue_sourcebut I was trying to reuse/minimise the number of fields.@Horseechen commented on GitHub (Feb 14, 2023):
No, the example is incorrect. The parameter in Example 6 works in Example 7. You get the "right" result just by chance. You may try to change the value in reference cells then you will find that truth. Or you may comment Example 6's code, if you do so, the program will return a warning message.

@Horseechen commented on GitHub (Feb 14, 2023):
By the way, in this page http://libxlsxwriter.github.io/working_with_data_validation.html

data_validation->validateis assigned withLXW_VALIDATION_TYPE_LIST_FORMULAJust check it, I believe that the example code is incorrect.
I followed the http://libxlsxwriter.github.io/working_with_data_validation.html page and got the right result.
@jmcnamara commented on GitHub (Feb 14, 2023):
Ok, thanks. I get it now.
You are right the example is incorrect. The validation type should be
LXW_VALIDATION_TYPE_LIST_FORMULA. I will fix it.@Horseechen commented on GitHub (Feb 14, 2023):
I would like to say thank you because the libxlsxwriter is really useful. Thank you for your sharing.
@jmcnamara commented on GitHub (Feb 14, 2023):
Fixed on main and the documentation has been updated. Thanks for the report.