Libraries of gdoctableapp for golang, Node.js and python were updated to v1.1.0
Libraries of gdoctableapp for golang, Node.js and python were updated to v1.0.5
Update History
Gists
This is a sample script for creating a table to Google Document by retrieving values from Google Spreadsheet for Python.
Before you use this script, please install python library of gdoctableapppy.
$ pip install gdoctableapppy
Sample script:
This sample script uses Service Account.
In this sample script, the values are retrieved from Sheet1!A1:C5 of Spreadsheet, and new table is created to the Document using the values.
from google.oauth2 import service_account
from gdoctableapppy import gdoctableapp
from googleapiclient.discovery import build
SCOPES = ['https://www.googleapis.com/auth/documents',
'https://www.googleapis.com/auth/spreadsheets']
SERVICE_ACCOUNT_FILE = 'credential.json' # Please set the json file of Service account.
creds = service_account.Credentials.from_service_account_file(
SERVICE_ACCOUNT_FILE, scopes=SCOPES)
service = build('sheets', 'v4', credentials=creds)
spreadsheet_id = '###' # Please set here
document_id = '###' # Please set here
res = service.spreadsheets().values().get(
spreadsheetId=spreadsheet_id, range='Sheet1!A1:C5').execute()
values = res['values']
resource = {
"service_account": creds,
"documentId": document_id,
"rows": len(values),
"columns": len(values[0]),
"append": True,
"values": values
}
res = gdoctableapp.CreateTable(resource)
print(res)
References:
Gists
This is a sample script for creating a table to Google Document by retrieving values from Google Spreadsheet for Node.js.
Before you use this script, please install Node.js module of node-gdoctableapp.
$ npm install --save-dev gdoctableapp
or
$ npm install --global gdoctableapp
Sample script:
This sample script uses Service Account.
In this sample script, the values are retrieved from Sheet1!A1:C5 of Spreadsheet, and new table is created to the Document using the values.
Overview
This is a python library to manage the tables on Google Document using Google Docs API.
Description
Google Docs API has been released. When I used this API, I found that it is very difficult for me to manage the tables on Google Document using Google Docs API. Although I checked the official document, unfortunately, I thought that it’s very difficult for me. So in order to easily manage the tables on Google Document, I created this library.
Overview
This is a Node.js module to manage the tables on Google Document using Google Docs API.
Description
Google Docs API has been released. When I used this API, I found that it is very difficult for me to manage the tables on Google Document using Google Docs API. Although I checked the official document, unfortunately, I thought that it’s very difficult for me. So in order to easily manage the tables on Google Document, I created this library.
Overview
This is a Golang library for managing tables on Google Document using Google Docs API.
Description
Google Docs API has been released. When I used this API, I found that it is very difficult for me to manage the tables on Google Document using Google Docs API. Although I checked the official document, unfortunately, I thought that it’s very difficult for me. So in order to easily manage the tables on Google Document, I created this library.
Gists
This is a sample script for creating new table and putting values to cells using Google Docs API with Google Apps Script. Unfortunately, in the current stage, although I had been looking for the method for creating a table and putting the values in each cell at the official document, I couldn’t find. Google Docs API is growing now. So such documents might be not prepared yet. By this situation, I investigated about the method for achieving this method.