-1

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);
Chandrababu
  • 61
  • 2
  • 9

1 Answers1

1

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

Sudhi Ramamurthy
  • 2,358
  • 1
  • 10
  • 14
  • Yes, beta version has to be considered. I used the below function to check my office whether my ExcelApi version supported or not, I have 2016 professional installed in my machine. But I am seeing 1.1 vesion always, any suggestions to get available versions of 2016. if (!Office.context.requirements.isSetSupported('ExcelApi', '1.2')) { app.showNotification("Need Office 2016 or greater", "Sorry, this add-in only works with newer versions of Excel."); return; } – Chandrababu Dec 05 '17 at 09:23
  • 1
    Depending on your license, you can get the latest monthly channel version to stay up to date. You can also download insider-fast build for faster update cycle. You'd need the appropriate license in both cases. – Sudhi Ramamurthy Dec 05 '17 at 12:22