Skip to content

Instantly share code, notes, and snippets.

@MarcinusX
Created July 23, 2018 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcinusX/31114bf5f9849b1e22e312305ae5ec59 to your computer and use it in GitHub Desktop.
Save MarcinusX/31114bf5f9849b1e22e312305ae5ec59 to your computer and use it in GitHub Desktop.
public async setValidation(source: Excel.Range, target: Excel.Range) {
Excel.run(function (context) {
return context.sync().then(() => {
target.dataValidation.rule = {
list: {
inCellDropDown: true,
source: source.values.toString(),
}
};
return context.sync();
})
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment