久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

設置“發(fā)布到網絡"在 Google 電子表格中使用

Set quot;publish to webquot; in Google spreadsheet using Drive python API(設置“發(fā)布到網絡在 Google 電子表格中使用 Drive python API)
本文介紹了設置“發(fā)布到網絡"在 Google 電子表格中使用 Drive python API的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試使用 Python 版本的 Google Drive API 在 Google 文檔中模擬單擊發(fā)布到網絡"->立即開始發(fā)布".根據我對文檔的模糊理解,我相信這應該可行:

I'm trying to simulate clicking "publish to web" -> "start publishing now" in Google docs using the Python version of the Google Drive API. Based on my vague understanding of the documentation, I believe this should work:

service.revisions().update(fileId = newfile['id'],
    revisionId='head', body={'published':True, 'publishAuto': True})

但是,這似乎對我的文檔沒有影響.

However, this appears to have no effect on my document.

我希望能夠以編程方式創(chuàng)建一個可供全世界立即訪問的 Google 電子表格.

I'd like to be able to programmatically create a Google spreadsheet that is immediately world-accessible.

推薦答案

原來上面代碼片段返回的響應對象需要調用execute():

Turns out the response object that's returned by the code snippet above needs to call execute():

service.revisions().update(fileId = newfile['id'], revisionId='head',
    body={'published':True, 'publishAuto': True}).execute()

這會返回一個修訂對象并設置文檔的發(fā)布屬性.

This returns a revision object and sets the publish properties on the document.

這篇關于設置“發(fā)布到網絡"在 Google 電子表格中使用 Drive python API的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯(lián)網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

相關文檔推薦

Troubles while parsing with python very large xml file(使用 python 解析非常大的 xml 文件時出現問題)
Find all nodes by attribute in XML using Python 2(使用 Python 2 在 XML 中按屬性查找所有節(jié)點)
Python - How to parse xml response and store a elements value in a variable?(Python - 如何解析 xml 響應并將元素值存儲在變量中?)
How to get XML tag value in Python(如何在 Python 中獲取 XML 標記值)
How to correctly parse utf-8 xml with ElementTree?(如何使用 ElementTree 正確解析 utf-8 xml?)
Parse XML from URL into python object(將 XML 從 URL 解析為 python 對象)
主站蜘蛛池模板: 日日草天天干 | 中文字幕91av | 久久久久久久久久久福利观看 | 亚洲高清一区二区三区 | 中国一级特黄毛片大片 | 紧缚调教一区二区三区视频 | 成年人免费看的视频 | 久久久久久久久久毛片 | 久久久久免费精品国产 | 国产精品免费在线 | 亚洲一区二区三区免费在线观看 | 国产亚洲精品久久久久动 | 免费毛片网 | 一区视频 | 精品九九九 | 精品免费国产视频 | 亚洲国产网站 | 色男人天堂av | 久久久久国产精品午夜一区 | 久久小视频 | 午夜影院操 | 国产免费一区二区 | 国产色黄| 色资源站 | 综合九九| 欧美在线观看一区 | 欧美精品影院 | 国产欧美在线 | 日韩在线精品视频 | 亚洲色欧美另类 | 亚洲精品视频在线播放 | 欧美性影院 | 国产精品久久久久久妇女 | 国产激情一区二区三区 | 亚洲精品国产综合区久久久久久久 | 波多野结衣在线观看一区二区三区 | 久久久精品网站 | 国产亚洲一区二区三区在线观看 | 蜜臀久久99精品久久久久野外 | 国产精品小视频在线观看 | 中文字幕第一页在线 |