Excel如何“保存”?通过 HTTP 传输文件?

发布于 2024-12-15 17:26:36 字数 567 浏览 4 评论 0原文

我有一个在 Solaris 下的服务器上运行的应用程序。此应用程序以 CSV 格式导出一些可编辑的配置数据。编辑数据的首选方法是使用 Microsoft Excel。由于平台的差异,当前的工作流程由以下步骤组成:

  1. 将数据转储到服务器上的 CSV 文件
  2. ftp/sftp/scp 将文件传输到 Windows 计算机
  3. 在 Windows 上的 Excel 中编辑数据
  4. ftp/sftp/scp将文件传回服务器框
  5. 将数据导入服务器

我正在寻找一种简化工作流程并可能从 Excel 完成所有操作的方法。我知道我可以建立一个支持 CGI 的成熟 Web 服务器,以在一端的 HTTP 和服务器上的导出/导入脚本之间进行交互。或者,我可以运行一个进程内 Web 服务器,该服务器将像文件一样提供配置数据,然后它可以从 Excel 取回输入并处理它。

我的困难是,如果通过 HTTP 打开文件,我不知道 Excel 究竟如何将文件推回原处。它像带有一些参数的 POST 方法一样简单吗?或者我是否需要支持一整套WebDAV方法来接受Excel的输入?

谢谢你, /谢尔盖

I have an application that runs on a server under Solaris. This application exports some editable configuration data in CSV format. The preferred way to edit the data is to use Microsoft Excel. Due to the differences in platforms, the current workflow is comprised of the following steps:

  1. dumping the data into a CSV file on the server
  2. ftp/sftp/scp the file to the Windows machine
  3. edit the data on Windows in Excel
  4. ftp/sftp/scp the file back to the server box
  5. import the data into the server

I'm looking for a way to simplify the workflow and possibly doing everything from Excel. I know I could set up a full-blown web-server with CGI support to interface between HTTP on one end and export/import scripts on the server. Or I could run an in-process web-server that would serve the configuration data as if it was a file, and then it could take the input back from Excel and handle it.

My difficulty is that I do not know how exactly Excel pushes the file back if it was open over HTTP. Is it as simple as a POST method with some arguments? Or do I need to support a full set of WebDAV methods to accept the input from Excel?

Thank you,
/Sergey

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

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

发布评论

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

评论(2

喜爱纠缠 2024-12-22 17:26:36

当然,一种非常好的“无编程”方法是 WebDAV。

WebDav 基本上在文件级别工作。因此,如果您想操作二进制 .xls 或 .xls,则两台主机上都需要能够理解 .xls/.xlsx 格式的软件(例如 MS Excel;-))。

否则,也许您可​​以将数据以 .csv 格式“导入”到 Excel 或从 Excel 中“导出”,并使用 WebDev 共享 .csv 文件(而不是“原始”.xls/.xlsx 文件)。

有很多选择

One very good "no-programming" approach, of course, is WebDAV.

WebDav basically works at the file level. So if you want to manipulate a binary .xls or .xls, you'll need something on both hosts that understands .xls/.xlsx format (like, for example, MS Excel ;-)).

Otherwise, perhaps you could "import" and "export" the data to and from Excel as .csv, and use WebDev to share the .csv files (instead of the "original" .xls/.xlsx files).

There are lots of choices

牛↙奶布丁 2024-12-22 17:26:36

Windows 有一个用于下载文件的 API (URLDownloadToFile)(如果您提供 URL)。您可以编写一个 VBA 宏来下载文件、进行编辑,然后将文件(通过 FTP)推送回服务器。

供参考:

Windows has an API for downloading files (URLDownloadToFile), if you provide the URL. You could write a VBA macro that downloads the file, does your edits, then pushes the file (via FTP) back to your server.

For reference:

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