3

I'd like to use Google Apps Script to do insert a linked table from Google Sheets into a Google Document.

I'm aware that this is easily done manually using Copy > Paste > Link to Spreadsheet.

But is there a way to do this programmatically using Apps Script?

Anton Shpigunov
  • 184
  • 2
  • 8
  • If you check this [SO post](https://stackoverflow.com/questions/32602495/how-to-add-a-hyperlink-in-a-google-docs-using-a-google-script), everything related to your question was answered here. I think you need to dig down deeper as well in the documentation of [Sheets API](https://developers.google.com/sheets/api/guides/values) and [Google Apps Script](https://developers.google.com/apps-script/reference/spreadsheet/) to understand everything. – MαπμQμαπkγVπ.0 Aug 16 '18 at 11:59
  • Hi. I'm just looking at older questions, like yours, that don't have any/limited comments or answers. Did you resolve the "problem", or are you still looking for help? – Tedinoz Jan 09 '19 at 00:29
  • I did resolve the problem myself, albeit in a somewhat esoteric way. I wrote functions that would look for specifically marked fields in the Google Doc like %%table_1%% and replace these fields with tables generated from Google Sheets data. So yes, the problem could be considered solved for now. – Anton Shpigunov Jan 09 '19 at 22:02
  • 1
    Hey i understand how to create table and fill the data in Google doc. But did you solve the problem of linked copy , i.e when you change value in spreadsheet this table in doc will show refresh button to fetch the fresh data. – Sudhanshu Patel Oct 11 '20 at 01:30

1 Answers1

1

This feature is currently not available. although already raised the issue that you can track and also add your comments to prioritize it.

https://issuetracker.google.com/issues/172154009

Sudhanshu Patel
  • 759
  • 1
  • 5
  • 12