Apps Script公式リファレンス: Apps Script Reference |障害・課題追跡: IssueTracker |Google Workspace: Status Dashboard - Summary


スライドの表でセルのフォントを変えたい - change the cell font in a table in Slides using Apps Script

Google Slidesに配置した表内のフォントを変更したくて試したコードです。
I tried to change the font style of text in a table in Google Slides using the following Apps Script.

Change the font of the selected table to Impact.

Apps Script
function setTableCellFont() {
const presentation = SlidesApp.getActivePresentation();
const selection = presentation.getSelection();
const pageElement = selection.getPageElementRange().getPageElements()[0];
const table = pageElement.asTable();
const numRows = table.getNumRows();
const numColumns = table.getNumColumns();
for (let row = 0; row < numRows; row++) {
for (let col = 0; col < numColumns; col++) {
const cell = table.getCell(row, col);
const textRange = cell.getText();
const textStyle = textRange.getTextStyle();


Class TextStyle > setFontFamily(fontFamily)

Latest post

Google Apps Scriptの障害時はIssueTrackerを見てみる - Incidents for Apps Script are reported on Issue Tracker

IssueTracker > Apps Script issues Google Apps Scriptの障害時は IssueTracker に課題が上がっていることが...