Advertisement
Guest User

Untitled

a guest
May 24th, 2017
679
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. name: Blank snippet - 2
  2. description: ''
  3. author: houssemDevs
  4. host: EXCEL
  5. api_set: {}
  6. script:
  7.     content: |
  8.         $("#run").click(run);
  9.  
  10.         async function run() {
  11.             try {
  12.                 await Excel.run(async (context) => {
  13.                     var sheet = context.workbook.worksheets.getActiveWorksheet();
  14.  
  15.                     var range = sheet.getRange('A1:I2');
  16.  
  17.                     range.merge(true);
  18.                    
  19.                     await context.sync();
  20.                 });
  21.             }
  22.             catch (error) {
  23.                 OfficeHelpers.UI.notify(error);
  24.                 OfficeHelpers.Utilities.log(error);
  25.             }
  26.         }
  27.     language: typescript
  28. template:
  29.     content: |
  30.         <button id="run" class="ms-Button">
  31.             <span class="ms-Button-label">Run</span>
  32.         </button>
  33.     language: html
  34. style:
  35.     content: "/* Your style goes here */\r\n"
  36.     language: css
  37. libraries: |
  38.     # Office.js
  39.     https://appsforoffice.microsoft.com/lib/1/hosted/office.js
  40.  
  41.     # CSS Libraries
  42.     office-ui-fabric-js@1.4.0/dist/css/fabric.min.css
  43.     office-ui-fabric-js@1.4.0/dist/css/fabric.components.min.css
  44.  
  45.     # NPM libraries
  46.     core-js@2.4.1/client/core.min.js
  47.     @microsoft/office-js-helpers@0.7.1/dist/office.helpers.min.js
  48.     jquery@3.1.1
  49.  
  50.     # IntelliSense: @types/library or node_modules paths or URL to d.ts files
  51.     @types/office-js
  52.     @types/core-js
  53.     @microsoft/office-js-helpers@0.7.1/dist/office.helpers.d.ts
  54.     @types/jquery
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement