サービス
サービスを探す
プロ人材を探す
仕事を探す
ブログを探す
サービス
サービスを探す
プロ人材を探す
仕事を探す
ブログを探す
- サービスを探す
- プロ人材を探す
- ノウハウ・素材を探す
- ブログを探す
- エージェントに人材を紹介してもらう
- 単発の仕事を探す
- 継続 (時給/月給) の仕事を探す
- エージェントに仕事を紹介してもらう
購入・発注したい方
受注・働きたい方
カテゴリ一覧
- PRO認定
- 人気のご利用シーン
- コンテンツ
弁護士検索・法律Q&A(法律相談)

const book = SpreadsheetApp.getActiveSpreadsheet();
const sheet = book.getActivesheet();
const protect = sheet.getRange(row,col,row2,col2).protect();
//オーナーは必ず権限を持つので注意
protect.addEditor(email); //単一ユーザー登録時
protect.addEditors(emailarry); //複数ユーザー登録時、配列を渡す
protect.setDomainEdit(true); //GWでドメインユーザーを許可する場合
const book = SpreadsheetApp.getActiveSpreadsheet();
const sheet = book.getActiveSheet();
const pType = SpreadsheetApp.ProtectionType;
const protect = sheet.getProtections(pType.RANGE);
for(let i=0; i<protect.length; i++){
protect[i].remove();
}
//行、列のスタート位置の取得
const sRow = protect[i].getRange().getRow();
const sCol = protect[i].getRange().getColumn();
//行、列の最終位置を取得したい時
const eRow = protect[i].getRange().getLastRow();
const eCol = protect[i].getRange().getLastColumn();
//行、列の範囲数を取得したい場合
const rRow = protect[i].getRange().getNumRows();
const rCol = protect[i].getRange().getNumColmuns();