是否可以在无需身份验证的情况下查询 Google Docs 中公开共享的用户文档?
我正在寻找的具体最终目标是能够提供用户 ID,然后列出具有集合中特定标记的所有公开共享文档。
谢谢。
我知道 Google Drive 有一个 API。有没有办法使用它本质上使用 Google Docs 作为应用程序的富文本编辑器?即我希望能够执行以下操作:
google-docs rich-text-editor google-docs-api google-drive-realtime-api
抱歉,如果这最终变得冗长。
就像服务器一样,您可以在其中保存数据,并且用户可以使用正确的代码访问它。我可以将我的文本文件放在 Google 云端硬盘上,将其公开,然后允许我的应用程序访问它们吗?
我已经使用我创建的本地网络服务器完成了此操作。AsyncTask与服务器上的 .php 文件交互,php 文件从 mySQL 数据库调用数据。这当然可行,但由于我无力支付服务器费用,是否可以选择将我的数据放入文本文件并将其托管在 Google 云端硬盘上?那么就用AsyncTask来调用它们吧?我在尝试时遇到错误。我开始认为这是不可能的。
本质上,我有什么办法可以使用 Google Drive 作为服务器吗?如果我无法使用,有人知道还有其他可靠的免费网站吗?我知道我的 AyncTask 代码可以工作,因为当我使用 XAMPP 在旧笔记本电脑上创建本地服务器时,我能够托管一个 mySQL 数据库和 .php 文件,其工作方式如上所述。
我的应用程序目前处于离线状态,只是我想要更改,因此我不必每周通过 Play 商店向用户发送应用程序更新。有什么建议吗?
感谢您的帮助,我知道这严格来说与代码无关,或者如果可以使用 Google Drive,也许可能是这样。
这是我的应用程序,以便您可以了解我正在使用的数据以及我想如何显示它: https: //play.google.com/store/apps/details ?id=com.history.f1historyfree
android google-docs google-docs-api android-asynctask google-drive-api
考虑以下 Google 应用脚本代码:
var ui = SpreadsheetApp.getUi();
var result = ui.prompt(
'How many days in advance you want to receive the event notification?',
'',
ui.ButtonSet.OK_CANCEL);
Run Code Online (Sandbox Code Playgroud)
我希望对话框在输入框中显示默认值。
其次,我们是否有输入/发送数据的键盘快捷键?以便用户可以点击Enter(或喜欢)接受默认值或value-Enter 发送他/她自己的值。
modal-dialog google-api google-docs-api google-apps-script google-spreadsheet-api
可以检索打开的 Google 文档文档的元素,从
\n\nDocumentApp.openById(doc_id, folder_id)\nRun Code Online (Sandbox Code Playgroud)\n\n但文档上的评论是通过 Drive API 检索的Comments.list
在包含 2 条注释的文档上运行此命令:一条在图像上,一条在段落中的单词上,这表明虽然文本锚定注释可以,但图像不会返回条目context:
"content": "test comment on text",\n "deleted": false,\n "status": "open",\n "context": {\n "type": "text/html",\n "value": "some text the comment is placed on"\n },\n "anchor": "kix.xxxxxxxxxxx1",\nRun Code Online (Sandbox Code Playgroud)\n\n "content": "test comment on an image",\n "deleted": false,\n "status": "open",\n "anchor": "kix.xxxxxxxxxxx2",\nRun Code Online (Sandbox Code Playgroud)\n\n其中xxxxxxxxxxx1/xxxxxxxxxxx2是唯一的锚点 ID 后缀,以及kixGoogle“专有”锚点/编辑器系统的前缀(正如 Steven Bazyl 在“管理评论和讨论”开发者指南页面的视频中所描述的那样)。
\n“锚点基本上告诉我们该评论适用于文档中的哪个位置。因为这是我们的格式(在 …
我有将文件嵌入页面并在 Google Docs Viewer 中打开的代码。但到目前为止,当我想打开 .doc 或 docx 文件时,我得到“无预览可用”,但在打开 PDF 文件时可以正确打开。再次提示我不是在 Google Docs 中打开文件而是下载文件而不是在浏览器上查看它。
这是我的代码:
<a href="sample.doc" class="embed"><h2>sample.doc</h2><button >view document</button></a>
<script>
$(document).ready(function() {
$('a.embed').gdocsViewer({width:740,height:742});
$('#embedURL').gdocsViewer();
});
</script>
Run Code Online (Sandbox Code Playgroud)
这是我的 jQuery 插件:
(function($){
$.fn.gdocsViewer = function(options) {
var settings = {
width : '600',
height : '700'
};
if (options) {
$.extend(settings, options);
}
return this.each(function() {
var file = $(this).attr('href');
var ext = file.substring(file.lastIndexOf('.') + 1);
if (/^(tiff|doc|ppt|pps|pdf|docx)$/.test(ext)) {
$(this).after(function () {
var id = $(this).attr('id');
var gdvId = (typeof id …Run Code Online (Sandbox Code Playgroud) 我想将Google Doc文件另存为pdf与Google Drive当前文件相同的文件夹中。我知道我可以将文件下载为 . pdf,但是我必须将其上传到同一Google Drive文件夹中。我试图跳过上传步骤。
我已经创建了一个脚本来完成所有这些,但我无法将图像和绘图包含在生成的pdf.
这是我的代码:
function onOpen() {
// Add a custom menu to the spreadsheet.
var ui = DocumentApp.getUi();
var menu = ui.createAddonMenu();
menu.addItem('Save As PDF','saveToPDF')
.addToUi();
}
function saveToPDF(){
var currentDocument = DocumentApp.getActiveDocument();
var parentFolder = DriveApp.getFileById(currentDocument.getId()).getParents();
var folderId = parentFolder.next().getId();
var currentFolder = DriveApp.getFolderById(folderId);
var pdf = currentDocument.getAs('application/PDF');
pdf.setName(currentDocument.getName() + ".pdf");
// Check if the file already exists and add a datecode if …Run Code Online (Sandbox Code Playgroud) 我想使用 google appscript 替换我的 google 文档上的文本以将其转换为 PDF。但问题是函数 replaceText(textToReplace, newText); 只需删除匹配文本的每个匹配项。我只想删除第一次出现。怎么做?
我正在使用 Google Docs API 来更新文档中的内容。
该文档有一个目录,但在使用 API 对文档进行更改后,该目录不会自动更新。
我发现的唯一方法是手动打开文档并单击目录旁边的刷新图标,这将更新目录。
有没有办法使用 Google Docs API 以编程方式执行此操作?
我已成功使用此 URL 从 JSON 格式的 Google 表格中提取数据:
https://spreadsheets.google.com/feeds/cells/<SHEETS_ID>/1/public/full?alt=json
我现在想获取 Google Docs 文档的 JSON。这样做的网址是什么?
我知道我可以使用 GET API,但我正在尝试使用简单的 AJAX 而没有 OAuth(文件是公开的)
google-docs-api ×10
google-api ×2
google-docs ×2
android ×1
javascript ×1
jquery ×1
json ×1
modal-dialog ×1
pdf ×1
php ×1