This is a sample data for this sample script. The column B was created by the normal distribution formula, and the column C was created by multiplying random number for column B.
A, B, C
1.0, 0.0001, 0.0000
1.5, 0.0009, 0.0006
2.0, 0.0044, 0.0037
http://ユーザ名:パスワード@ルータのIPアドレス |
This is a sample data for this sample script. The column B was created by the normal distribution formula, and the column C was created by multiplying random number for column B.
A, B, C
1.0, 0.0001, 0.0000
1.5, 0.0009, 0.0006
2.0, 0.0044, 0.0037
This sample script embeds a map to a cell using custom function on Spreadsheet.
I think that this method is one of various ideas.
When the map is embeded to a cell on spreadsheet as an image, the function =IMAGE()
is suitable for this situation. However, setFormula()
for importing =IMAGE()
and DriveApp.createFile()
for creating images from maps also cannot be used for custom functions.
This sample script sends an e-mail with an Excel file exported from Spreadsheet as an attachment file.
function excelSender() {
var sheetID = [Sheet ID];
var xlsxName = [Excel file name];
var params = {
"headers" : {Authorization: "Bearer [Retrieved AccessToken]"},
This method was updated at July 12, 2017. But I think that this is a temporal workaround. When the official update is done for retrieving revision files, this will be updated.
In order to use this, at first, please retrieve your access token and enable Drive API.
Retrieve file id from file name.
This is a sample script for decoding Gmail body with Japanese language using Python.
msg = service.users().messages().get(userId='me', id=id).execute()
parts = msg['payload']['parts']
for e in parts:
msg = base64.urlsafe_b64decode(e['body']['data']).decode('utf-8').encode('cp932', "ignore").decode('cp932')
print(msg)
It has investigated the differences between the documents of "Search for Files" for v2 and v3. The following table shows the comparison of v2 and v3 for "Valid fields for files.list". The column of DriveApp.searchFiles()
means whether the query can be used for DriveApp.searchFiles()
.
v2 | v3 | Difference | DriveApp.searchFiles() |
---|---|---|---|
title | name | different | v2: succeed, v3: fail |
fullText | fullText | same | |
mimeType | mimeType | same |