收到有关 MS Excel 文件不再在 Progress 4GL (ABL) 中使用的通知

发布于 2024-07-06 13:55:32 字数 246 浏览 11 评论 0原文

有一个使用 AppServer 的 GUI ADM2 Progress v9 应用程序。

它需要让用户能够查看存储在 AppServer 上的 MS Excel 文件。 到目前为止:

  1. 将 .xls 文件从 AppServer 提取到本地驱动器。
  2. 启动 MS Excel 的副本并打开文件。

问题是,一旦不再需要本地驱动器上的临时文件,就需要将其删除。 有什么提示吗?

There is a GUI ADM2 Progress v9 application using AppServer.

It needs to give users an ability to view MS Excel files stored on the AppServer. So far it:

  1. Pulls .xls file from AppServer to a local drive.
  2. Fires up a copy of MS Excel and opens the file.

The problem is that the temporary file on the local drive needs to be removed once it's no longer required. Any hints?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝海 2024-07-13 13:55:32

您可以使用 Progress 中的 os-command 函数运行 Excel,并告诉它等待,直到您完成查看才返回进度代码。 一旦退出 Excel,请对该文件运行 os-delete 命令。

You can run Excel using the os-command function in Progress and tell it to wait until you're done viewing to come back to the progress code. Once you're out of Excel run the os-delete command against the file.

撩人痒 2024-07-13 13:55:32

如果您要“启动 Excel 的副本”,是否有任何特殊原因您不能直接将“启动”Excel 应用程序指向应用程序服务器上的文件?
如果您从命令启动 Excel -line shell,您可以直接转到 Excel.exe "http://myserver/myexcelbook.xls" 对吗?

如果您通过 Office Interop Assemblies 等方式打开它,则可以关闭 Application.WorkBookBeforeClose 事件,例如

ThisMethodHandlesTheWorkbookBeforeCloseEvent()
{
  DeleteTheFile();
}

If you are "firing up a copy of Excel", is there any special reason you can't just point that "fired-up" Excel application at the file on your App Server?
If you are starting Excel from a command-line shell, you could just go Excel.exe "http://myserver/myexcelbook.xls" right?

If you are opening it via something like Office Interop Assemblies, then you can key off of the Application.WorkBookBeforeClose event like

ThisMethodHandlesTheWorkbookBeforeCloseEvent()
{
  DeleteTheFile();
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文