我可以在 Google 表格中重新定位无模式对话框吗?

Can I reposition a modeless dialog in Google Sheets?

使用 Google Apps 脚本,如何定位无模式对话框?

这里是我的 Code.gs 函数,它打开无模式对话框并将现有的 html 文件渲染到其中:

ui = SpreadsheetApp.getUi();

function sillyFunc() {
  var html = HtmlService.createHtmlOutputFromFile("SillyFunc")
    .setWidth(600)
    .setHeight(500);
  ui.showModelessDialog(html, "Silly Func");
};

一切正常,但无模式对话框会在我的浏览器中央打开。有什么方法可以在创建时定位它吗?

我真正想要的是在我的电子表格中呈现 html 文件 - 它是通过 Google 的可视化 API 创建的图表。据我所知,这是不可能的。最接近的似乎是使用无模式对话框。

感谢任何帮助!

据此, there is no way to position the ModelessDialog programmatically. But, you can move it manually by clicking the title and dragging the dialog. For more information about ModelessDialog, check this link