How to define Excel using microsoft office-js in Angular 6
问题 I am following this site to integrate office js On declaring like this: import * as Excel from '@microsoft/office-js/excel' It's showing compile time error: Cannot find module '@microsoft/office-js/excel' On declaring like this: declare var Excel: any It's showing run time error: ERROR ReferenceError: Excel is not defined Please suggest how to declare it. I need to use it like this: Excel.run(session, (context){ ... }); 回答1: Install office type definition: npm install --save @types/office-js