我需要在我的网站中控制嵌入式Google文档查看器.更具体地说,我需要能够启用/禁用Google幻灯片视图的控件,并能够使用JavaScript启动/停止演示.
我无法找到任何JavaScript API,也无法添加我的主机,因此我的JavaScript能够与iframe
内容进行通信.
有人做过这样的事吗?
我想以PDF格式下载此链接:
不幸的是,这个URL使用我认可并可以操作的非标准格式.
将其修改为类似的东西
不起作用.
Google云端硬盘文件ID应为44个字母数字字符,但显然这长度为86个字符.
任何人都可以帮忙解释这是什么格式?
我有一个工作表,其中在单元格中设置了超链接,但没有通过公式设置。单击单元格时,在“ fx”栏中,它仅显示该值。
我在网上搜索,但到处都是,信息是通过使用提取超链接getFormula()
。
但就我而言,根本没有设定公式。
I can see hyperlink as you can see in image, but it's not there in "formula/fx" bar.
How to get hyperlink of that cell using Apps Script or any formula?
cell hyperlink google-sheets google-apps-script google-sheets-formula
我在Chrome 26中打印页面时出现问题,其中表格显示为灰色背景色.
当我用chrome模拟CSS媒体打印查看页面时,它看起来很好
在Safari中打印时一切正常.任何人都知道如何解决这个问题?
我正在将数据库移动到使用之前有20M max_allowed_packet的Google Cloud SQL.
目前,max_allowed_packet的Google Cloud SQL默认值为1M.
有没有办法将此变量增加到20M?我已经尝试过以下方法:
set global max_allowed_packet = 20971520;
Run Code Online (Sandbox Code Playgroud)
哪个回报:
set global max_allowed_packet = 20971520;
Run Code Online (Sandbox Code Playgroud)
然后:
set global max_allowed_packet = 20971520;
Run Code Online (Sandbox Code Playgroud)
这会返回错误:
set global max_allowed_packet = 20971520;
Run Code Online (Sandbox Code Playgroud)
预先感谢您的帮助!
通常,当我使用Google表格API时,我会从"发布工作表"菜单选项中获得一个非常可预测的网址结构,我用它来提取带有正则表达式的电子表格ID,并将其用于Google表格API上的其他任务.
这已经工作了多年,并且是Google的文档建议从URL获取电子表格ID的方式.
例如
https://docs.google.com/spreadsheets/d/{MYSPREADSHEETID}/pubhtml
Run Code Online (Sandbox Code Playgroud)
但是,截至今天,在发布电子表格时,我现在得到一个这样的网址:
https://docs.google.com/spreadsheets/d/e/2PACX{BUNCH OF RANDOM CHARACTERS}/pubhtml
Run Code Online (Sandbox Code Playgroud)
这会破坏我的代码,因为出现在2PAC中的一堆随机字符不是电子表格ID,也不适用于API.
有谁知道这是对Google的网址结构或某种错误的未经宣布的更改?
我将用一个例子来展示我的问题:
我有一个按钮.单击时,它会根据TextInputFields
加载项中的内容创建邮件草稿.我有一个验证功能,可以说明字段填写是否正确.
如果我想以某种方式通知用户有关错误的字段,我必须创建一个通知或重建带有错误信息的卡.这些操作可以正常返回Action
,但不能返回composeAction
(因为composeAction
必须使用构建的草稿返回),所以我必须向composeAction
按钮注册一个简单的操作.
当我点击这种按钮时,只有一个动作执行而另一个动作无效.
关于我如何尝试实现的一些代码:
section.addWidget(CardService.newTextButton()
.setText('Validate and Create')
.setComposeAction(CardService.newAction().setFunction('doIt'), CardService.ComposedEmailType.STANDALONE_DRAFT)
.setOnClickAction(CardService.newAction().setFunction('notify')));
Run Code Online (Sandbox Code Playgroud)
ActionFunctions:
function doIt(event){
validate the event['formInput'] object;
if(valid the formInput)
create andr return the draft;
else
return null;
}
function notify(event){
validate the event['formInput'] object;
if(valid the formInput)
return null;
else
return notify or rebuilded card with error info;
}
Run Code Online (Sandbox Code Playgroud)
主要是简单的动作运行,而compose什么都不做.如果我将Logger.log()
函数放在回调函数中,则只有一个出现在api日志中.
有人在验证之前尝试过并在同一次点击中创建草稿吗?
我正在使用chrome.identity.launchWebAuthFlow
方法从我们的 OAuth2 服务器启动 OAuth2 令牌生成。
在 Identity API 文档中,指定对用户进行身份验证有两种可用的方法:getAuthToken
和launchWebAuthFlow
。我们使用后者是因为正如文档中所指定的:
如果您的应用程序使用自己的服务器来验证用户身份,则需要使用 launchWebAuthFlow。
我们正在努力缓存结果。在阅读 的文档时getAuthToken
,似乎涉及到一些智能缓存。
Chrome 捕获响应并将 和 存储access_token
在renew_token
浏览器中(此处可见:)chrome://identity-internals/
。Chrome仅在过期时才access_token
向 OAuth 服务器请求。access_token
然而,使用 时launchWebAuthFlow
,我们很难使用 Chrome 缓存,而且它每次都会调用我们的 OAuth 服务器。
有谁知道如何使用API的这种方法缓存结果?
在 Google 幻灯片中,可以通过右键单击幻灯片并选择“跳过幻灯片”来手动跳过幻灯片。在这种情况下,幻灯片在演示时不会显示。
我似乎无法使用 Google Apps 脚本以编程方式重新创建它。这个功能是否存在,或者这里有什么解决方法?