'`openxlsx` `dataValidation`: providing text input in list insteaf of cell reference
The documentation for openxlsx::dataValidation
demonstrates how to get a dropdown menu by referencing cell(s). However, I'm interested in adding text input ("Yes" and "No") as dropdown menu options, but every attempt I've tried results in corrupted files (on Excel for Mac). Alternatives I've tried for the value
argument involves "Yes;No"
, "Yes,No"
, "'Yes;No'"
, "'Yes';'No'"
, but all are unsuccessful.
Any suggestions on how to resolve this issue? I am aware that I can create yes and no as cell references from, for example, a separate sheet with such list inputs. But I would like to avoid it if possible.
Solution 1:[1]
It is not an available option with the dataValidation function in openxlsx. The list operator type only works with cell references in this function.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Bob Sleik |