2

I'm following the doc (https://dev.office.com/reference/add-ins/excel/excel-add-ins-reference-overview) to build an Excel add-in. The add-in needs to populate an Excel table column with either dropdown or checkbox for the user to select actions to be done on the table row. I can't seem to find any API to insert dropdown/checkbox in Excel spreadsheet. Could someone advise how I could do that? Thanks!

2 Answers 2

0

UI controls such as text box, check box, button, etc. are not supported in Office-js. You'd instead need to accept such user inputs within your task pane or dialog box. Alternatively, you could accept inputs within Excel cells as well (though that is bit hard) and drop down values within cells can be included using data validation API (still in beta) to help with controlling input values.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the clarification, Sudhi!
0

Try getting the cell and calling

cell.dataValidation = {
  type: 'list',
  allowBlank: true,
  formulae: ['"Selected,Rejected,On-hold"'],
};

based on How to add data validation list in excel using javascript

1 Comment

Haven't tried this myself, just researching the javascript api before using it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.