我想知道有什么办法可以使用 Google Apps 脚本在 Google 表格中截取屏幕截图。我浏览了一下,在任何地方都找不到这个问题或答案。
或者如果不使用 Google Apps 脚本,可以通过任何其他方式完成。
最佳答案
您将无法使用应用程序脚本截取屏幕截图。由于安全限制,不可能使用其他人提到的 HTML 功能,要么您的脚本界面以 iframe 模式运行,要么使用 caja,无论哪种方式您都无法访问父窗口,caja 会阻止这些 html5 方法。
您的最佳选择是使用 Google Apps 脚本将工作表转换为 PDF。
如果您在转换为 PDF 时遇到问题,请参阅其他答案:Google Apps Script - Create PDf from Spreadsheet produces pdf of Google sign in page .
关于javascript - 如何截取 Google 表格的屏幕截图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35768125/