从 Google 应用脚本(https://developers.google.com/apps-script/),I 得到这个:-
var doc = DocumentApp.create('Hello, World');
// Access the body of the document, then add a paragraph.
doc.getBody().appendParagraph('This document was created by Google Apps Script.');
// Get the URL of the document.
var url = doc.getUrl();
我想做的是能够从我的 javascript 或 java 代码中复制它,这样我就可以创建一个文档并获取它的 URL。如有任何帮助,我们将不胜感激。
请您参考如下方法:
您需要使用Google Drive API .