Is it possible to import XML or JSON data from a table within a Word online document into Apps Script website as an HTML table?

后端 未结 1 1055
不知归路
不知归路 2020-12-22 11:15

I am building a web app using Apps Script. In this web app I have a table that needs to be populated from a table in a Word doc in OneDrive. This document is updated regular

1条回答
  •  离开以前
    2020-12-22 11:36

    You need to incorporate the following steps

    • Read your data into a Google Apps function, e.g. with OneDriveApp as recommended by Cooper
    • Use google.script.run to call the Apps Script function from you html file
    • Incorporate a Web Polling function that updates your html table with fresh contents in desired intervals

    Sample:

    code.gs

    function doGet(){
      return HtmlService.createHtmlOutputFromFile('index');
    }
    function getFreshData(){
      //read here your Word Doc data, e.g. with One DriveApp and store it e.g. in an array
      ...
      return myDataArray;
    }
    

    index.html

    ...
    
    ...
      
    ...
    

    0 讨论(0)
提交回复
热议问题