-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some scripts for aggregation (#228)
- Loading branch information
1 parent
f7e96be
commit 8e0ebec
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 主要メソッド | ||
|
||
## セレクトボックス(プルダウンメニュー)を設定する | ||
|
||
## セルに色を付ける | ||
|
||
## 「固定」の区切り線を入れる | ||
|
||
## 「データの入力規則」を設定する | ||
|
||
## シートやセルを保護する | ||
|
||
## 「テキストの折り返し」を設定する | ||
|
||
## 「チェックボックス」を設定する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const getEachSheetId: Function = (): void => { | ||
const spreadsheet = SpreadsheetApp.getActiveSpreadsheet() | ||
const allSheets = spreadsheet.getSheets() | ||
|
||
const eachSheetId: Record<string, any>[] = [] | ||
for (let i = 0; i < allSheets.length; i++) { | ||
eachSheetId[allSheets[i].getName()] = allSheets[i].getSheetId() | ||
} | ||
|
||
let eachSheetIdForShownText = '' | ||
for (const [key, value] of Object.entries(eachSheetId)) { | ||
// ★ | ||
eachSheetIdForShownText += `${key},${value}\n` | ||
} | ||
|
||
console.log(eachSheetIdForShownText) | ||
Browser.msgBox(eachSheetIdForShownText) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const onOpen: Function = (): void => { | ||
SpreadsheetApp.getActiveSpreadsheet().addMenu('幻水総選挙', [ | ||
{ name: 'シート順ソート', functionName: 'sortSheetsByJapanese' }, | ||
{ name: 'シートID取得', functionName: 'getEachSheetId' }, | ||
]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const tryDropdown: Function = (): void => { | ||
const ss = SpreadsheetApp.getActive() | ||
const sh = ss.getSheetByName('Z_自由シート_01') | ||
const vrg = sh.getRange('A1').clear({ validationsOnly: true }) | ||
const dv = SpreadsheetApp.newDataValidation() | ||
.requireValueInList(['foo', 'bar'].sort(), true) | ||
.build() | ||
vrg.setDataValidation(dv) | ||
} | ||
// https://stackoverflow.com/questions/57347606/drop-down-list-from-column-with-comma-separate-data-google-sheets |