Is it possible to load List of values in excel using VSTO web add-ins using office.js

69 Views Asked by At

I am developing a excel add-in using office.js, that populates table data in excel sheet. Add-in allows user to update table column details, but I want to display list of reference values rather than free text. Example for scenario is given below. enter image description here

Table displayed in excel will have two columns Column 1 And Column 2, I will have reference data as shown in reference table, When user want to update column 2 I want user to select only allowed values, but I don't see any options available in office.js library. Please guide me If any of you have any suggestions to achieve my need.

I am loading table using offfice.js objects as given below

var data = serverTableObjectAsArray;                                         
var officeTable = new Office.TableData(); 
officeTable.addHeaders(data[0]);        
officeTable.addRange(data);
1

There are 1 best solutions below

2
On

Data validation was just introduced in 'beta' version. It is not available in the production version. You can check out the details in range.validation API here