変数 =《Page》.getColumns();
変数 =《Page》.getListItems();
変数 =《Page》.getComments( オプション );
変数 =《Page》.getAttachments( オプション );
変数 =《Page》.getHtmlContent();
《Column》.deleteColumn();
変数 =《Column》.getName();
《Column》.setName( 名前 );
《ListItem》.deleteListItem();
変数 =《ListItem》.getValueByIndex( インデックス番号 );
変数 =《ListItem》.getValueByName( 名前 );
《ListItem》.setValueByIndex( インデックス番号, 新しい値 );
《ListItem》.setValueByName( 名前, 新しい値 );
変数 =《ListItem》.getDatePublished();
変数 =《ListItem》.getLastUpdated();
《Comment》.deleteComment();
変数 =《Comment》.getContent();
《Comment》.setContent( テキスト );
変数 =《Comment》.getDatePublished();
変数 =《Comment》.getLastUpdated();
変数 =《Comment》.getAuthorName();
変数 =《Comment》.getAuthorEmail();
《Attachment》.deleteAttachment();
変数 =《Attachment》.getBlob();
変数 =《Attachment》.getAttachmentType();
変数 =《Attachment》.getContentType();
変数 =《Attachment》.getTitle();
変数 =《Attachment》.getDescription();
変数 =《Attachment》.getUrl();
変数 =《Attachment》.getDatePublished();
変数 =《Attachment》.getLastUpdated();
《Attachment》.setAttachmentType( テキスト );
《Attachment》.setContentType( テキスト );
《Attachment》.setTitle( テキスト );
《Attachment》.setDescription( テキスト );
《Attachment》.setUrl( テキスト );
※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
function getPageItem(){ var sheet = SpreadsheetApp.getActiveSheet(); var site = SitesApp.getSite("example.com","mysamplesite"); // ドメインは修正! var page = site.getChildByName("samplelist"); var cols = page.getColumns(); var items = page.getListItems(); for(var i = 0;i < cols.length;i++){ Logger.log(cols[i].getName()); sheet.getRange(1, i + 1).setValue(cols[i].getName()); for (var j = 0;j < items.length;j++){ Logger.log(items[j].getValueByIndex(i)); sheet.getRange(j + 2, i + 1).setValue(items[j].getValueByIndex(i)); } } }
<< 前へ |