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

How to add list dropdown validation type for a cell. #40

Closed
amfazlani opened this issue Jul 10, 2019 · 1 comment
Closed

How to add list dropdown validation type for a cell. #40

amfazlani opened this issue Jul 10, 2019 · 1 comment

Comments

@amfazlani
Copy link

Thank you for this great gem! I had a quick question about how to add a list data type inside a cell for example where user can only select from a, b, and c and its a dropdown list.

@amfazlani
Copy link
Author

amfazlani commented Jul 19, 2019

Hi, just following up on this question as it is very important to the feature I am building. I have been trying to look through the docs of libxlsxwriter and have found this https://libxlsxwriter.github.io/data_validate_8c-example.html

worksheet_write_string(worksheet,
                           CELL("A13"),
                           "Select a value from a drop down list",
                           NULL);

    char *list[] = {"open", "high", "close", NULL};

    data_validation->validate   = LXW_VALIDATION_TYPE_LIST;
    data_validation->value_list = list;

    worksheet_data_validation_cell(worksheet, CELL("B13"), data_validation);

But it doesnt seem to have that method on the Libxlsxwriter module. Would you be able to show me a workaround to add a dropdown list in a cell? Thank you.

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

1 participant