スプレッドシートをスクロールすると、行のヘッダー フィールドが非表示になり、同じスプレッドシートで太字のテキスト形式が必要になります。
質問
スプレッドシート API を使用して固定行とスタイルを設定できますか? 可能ですか?
スプレッドシートをスクロールすると、行のヘッダー フィールドが非表示になり、同じスプレッドシートで太字のテキスト形式が必要になります。
質問
スプレッドシート API を使用して固定行とスタイルを設定できますか? 可能ですか?
これは v4 API で利用できるようになりました。
JAVA API 実装のリファレンスは次のとおりです: https://developers.google.com/resources/api-libraries/documentation/sheets/v4/java/latest/com/google/api/services/sheets/v4/model/ GridProperties.html#setFrozenRowCount(java.lang.Integer)
API ドキュメントは次のとおりです: https://developers.google.com/sheets/reference/rest/v4/spreadsheets#gridproperties
App Script を使用して実行したい場合は、 https://developers.google.com/apps-script/reference/spreadsheet/sheet#setFrozenRows(Integer)も実行できます。
これは、Ruby API を使用して行った要求です。
update_sheet_properties: {
properties: {
sheet_id: 'YOUR SHEET ID HERE',
grid_properties: { frozen_row_count: 4 }
},
fields: 'gridProperties.frozenRowCount'
}