【发布时间】:2018-02-13 11:13:50
【问题描述】:
我们需要提取文档属性并在文档中显示是否有任何选项可以使用应用程序脚本显示,或者我们可以从文档中显示开箱即用的功能。
var documentProperties = PropertiesService.getDocumentProperties();
documentProperties.setProperty('DAYS_TO_FETCH', '5');`
var property = { key: 'department', value: 'Sales', visibility: 'PUBLIC' };
Drive.Properties.insert(property, "fileid_xxxxxx");
请提供任何建议。
【问题讨论】:
-
请用minimal and complete code sample 更新问题。什么文件属性?用户创建?或其他?有几种机制可以实现这一点,但需要更加具体。
-
var documentProperties = PropertiesService.getDocumentProperties(); documentProperties.setProperty('DAYS_TO_FETCH', '5');它用于设置文档的属性。我们想使用任何标识符访问文档中的这些属性
-
这还不清楚。您要为文档查找哪些exact 属性?您希望它作为正文的一部分显示在文档中吗?或者你想要一个使用
DriveApp的弹出窗口? -
我们需要使用文档中的那些属性
-
var property = { key: 'department', value: 'Sales', 可见性: 'PUBLIC' }; Drive.Properties.insert(property, "fileid_xxxxxx");它用于插入文件属性,我们需要从文档中访问这些属性
标签: google-apps-script google-docs google-workspace