在 Excel 中编写 Web 应用程序? 为什么不?

发布于 2024-07-25 22:43:44 字数 436 浏览 9 评论 0 原文

在你开始发火之前,我要告诉你,我正在努力说服自己这是一个坏主意。

基本上,我正在尝试创建一个具有一些基本会计功能的网站。 我的朋友是一位只懂 Excel 的顾问,他询问这是否可以是 Excel 电子表格而不是 Web 界面。

我发现自己在想,为什么 excel 在这种情况下不是更好的工具呢? 它拥有 web2.0 应用程序拥有的所有工具(脚本、数据库访问、基本格式化),并且是为会计而设计的。 您基本上可以使用 Excel 编写一个程序,从 SQL 数据库中获取数据,填充一些单元格,并使用公式来完成其余部分。

是否有使用 Excel 的先例,就像使用浏览器来制作 ajax-y web2 应用程序一样?

为什么这是一个坏主意?

更新:只是为了澄清,我的意思是这更多的是“修辞”讨论。 我不确定为什么消息的其余部分没有澄清这一点......

Before you start flaming, I'm going to tell you that I am trying to convince myself that this is a bad idea.

Basically, I'm trying to create a website with some basic accounting functions. My friend, a consultant who only knows excel, asked if this could be an excel spreadsheet instead of a web interface.

I found myself thinking, why is excel not the better tool in this case? It has all the tools a web2.0 app has (scripting, access to a db, basic formatting), and is made for accounting. You could basically use excel to write a program that fetches data from an SQL database, populates some cells, and use formulas for the rest.

Is there precedent to using excel as one would use the browser to make an ajax-y web2 app?

Why is this a bad idea?

Update: just to clarify I meant this to be more a "rhetorical" discussion. I'm not sure why the rest of the message didn't clarify that...

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

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

发布评论

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

评论(11

泪是无色的血 2024-08-01 22:43:44

好吧,如果你用 Excel 制作它,那么它就不是真正的 Web 应用程序。 这将是一个 Excel 应用程序。

但这并不是一件坏事。 如果在 Excel 中构建应用程序更有意义,那就去做吧。

在 Excel 中执行此操作时遇到的问题将与在任何桌面应用程序和 Web 应用程序中遇到的问题相同。 例如,您如何处理部署应用程序的新版本? 您如何处理针对新(或旧)版本 Excel 的应用程序更新? 预计

到达时间:

如果您想避免 Excel VBA 的错误和管理桌面应用程序的麻烦,您可能需要查看 Google 电子表格 API。 您可以使用它来动态创建/更新 Google 文档电子表格,包括公式和许多其他电子表格功能。 结合使用网络应用程序和 Google 电子表格可能会给您带来两全其美的效果,具体取决于您到底需要做什么。

Well, if you made it in excel, then it wouldn't really be a web application. It would be an Excel application.

Not that that's a bad thing though. If it makes more sense to build the app in Excel, then go for it.

The problems you'll have doing it in Excel will be the same as the problems you run into with any desktop vs. web application. For example, How do you handle deploying new versions of the app? How do you handle updating the app for new (or older) versions of Excel? etc.

ETA:

If you want to avoid the bugginess of Excel VBA and the headaches of managing a desktop application, you might want to look into the Google Spreadsheets API. You can use it to create/update Google docs spreadsheets on the fly, including formulas and lots of other spreadsheet goodness. Using a hybrid of web application and Google Spreadsheets might give you the best of both worlds, depending on what exactly you need to do.

昵称有卵用 2024-08-01 22:43:44

经过多年的 Excel-VBA 编程,如果您不这样做,我可以给您最好的答案:

Excel-VBA 是有缺陷的! 它可能是微软开发的漏洞最多的应用程序。 它对于某些任务来说非常有用,但是强迫它完成从未打算完成的工作会导致麻烦。

我有一些电子表格可以做类似的事情(比尔从未打算做的事情),无一例外,它们都在失败的边缘摇摇欲坠,并且往往会因最轻微的刺激而崩溃。

当然,你可以做到,但头痛是不值得的。

After years of programming in Excel-VBA, the best answer that I can give you for not doing this:

Excel-VBA is buggy! It is probably the most bug-filled app that Microsoft has produced. It's great for some tasks, but forcing it to do a job for which it was never intended will lead to trouble.

I have a few spreadsheets that do similar things, (things Bill never intended), and without exception, they teeter on the brink of failure, and tend to crash with only the slightest provocation.

Sure, you can do it, but the headache is not worth it.

一束光,穿透我孤独的魂 2024-08-01 22:43:44

Excel 本来就不应该这样使用,所以这会很痛苦。

网络电子表格集成的两个更好的想法:

  • 看看Resolver One,一个带有集成 Web 服务器的可编程 Excel 兼容电子表格。
  • 使用 Google 文档电子表格。 有API可以通过编程方式与它们进行交互。

Excel was not meant to be used that way, so it will be painful.

Two better ideas for web-spreadsheet integration:

  • Take a look at Resolver One, a programmable Excel-compatible spreadsheet with an integrated web server.
  • Use Google Docs spreadsheets. There is an API to interact programmatically with them.
紧拥背影 2024-08-01 22:43:44

这不是一个坏主意,但它确实有一些限制。 如果部署对您来说不是问题,并且您不需要对应用程序的“通用”访问权限,那么您的解决方案可能会为您节省一些时间。 Web 应用程序肯定是一种更优雅的方法,特别是如果您想让软件公开可用。

It's not a bad idea, but it does come with some limitations. If deployment isn't an issue for you, and you don't need "universal" access to the application, your solution will likely save you some time. A web application would certainly be a more elegant approach, particularly if you want to make the software available publicly.

孤独陪着我 2024-08-01 22:43:44

Web 本质上是基于 HTML 的,并添加了数据库、CSS 和服务器端语言以及 JavaScript(可能还有其他语言)。 与大多数事情一样,您应该使用正确的工具来完成工作。 如果您想要一个网站,那么您应该使用创建网站的工具。

Excel 并不是用来制作网站的,强迫它这样做可能会带来更多的挫败感而不是幸福感。

The web is inherently based on HTML and added to with Databases, CSS and server-side languages and javascript (possibly others). As with most things, you should use the right tool for the job. If you want a website then you should use the tools for creating a website.

Excel is not meant to make websites, forcing it to do so will likely lead to more frustration than happiness.

秋叶绚丽 2024-08-01 22:43:44

好吧,您将在服务器端运行它,您可能会遇到许可和性能问题。

如果您要向客户交付 .xls,那么您需要所有客户都拥有 Excel 或兼容的东西。 但你也失去了对你的“网站”的控制——如果你在本地拥有所需的一切,那么访问还有什么意义呢?

Well, you're going to run it on the server side, you'd probably run into licencing and performance issues.

If you're delivering .xls to the client, then you'd need for all your clients to have Excel or something compatible. But you also lose control over your "site" - what's the point of visiting if you have everything you need locally?

此生挚爱伱 2024-08-01 22:43:44

那么,SQL 语句会在客户端吗? 这很少是一个好主意。

So, the SQL statements would be on the client? That's rarely a good idea.

烧了回忆取暖 2024-08-01 22:43:44

这是一个坏主意,因为同样的原因,使用 MS Access 编写图形编辑器是不好的,或者使用 Powerpoint 编写 MMORPG 是不好的:)

我还想说,一旦你停止使用浏览器作为客户端,它就不再是一个“网络”应用程序” - 您实际上只是在谈论通过 HTTP 获取数据的 Excel 工作表。

It's a bad idea for the same reason that writing a graphics editor with MS Access is bad, or coding a MMORPG using Powerpoint is bad :)

I would also say that once you stop using a browser as the client it ceases to be a "web application" - you are really just talking about an Excel sheet which fetches its data via HTTP.

梦巷 2024-08-01 22:43:44

向所有说“Excel 应用程序不是 Web 应用程序”的人+1。

但是...如果您想使用电子表格来进行 Web 应用程序的服务器端计算,或者如果您想从服务器端代码访问 Excel 附带的财务函数库,您可以使用 Excel 服务。 它通过 SOAP 公开,可互操作,可从任何支持 SOAP 的平台调用。

它具有服务器功能。 它实际上并不在服务器上加载 Excel,而是函数的非 GUI 运行时。

+1 to everyone who said "an excel app is not a web app."

BUT... If you want to use the spreadsheet metaphor for server-side calculations for a web app, or if you want to access the library of financial functions that come with Excel from server-side code, you can use Excel Services. It's exposed via SOAP, interoperable, callable from any SOAP-capable platform.

It's server-capable. It does not actually load Excel on the server, but a non-GUI runtime of the functions.

纵性 2024-08-01 22:43:44

我认为使用 Excel 作为浏览器是个坏主意,但我认为更好的主意是在桌面应用程序中使用 Excel 控件。

这样你就可以控制sql和连接。 您可以根据需要随时保存数据。 您还可以实现一些更新机制。 应用程序将更安全,更难被黑客攻击。

我认为当您尝试连接到某些外部资源时 Excel 会冻结,这样您就可以控制一切。

I think that using Excel as Browser is bad idea, however i think better idea is to use Excel Control in Desktop App.

This way you can control the sql and connections. you can save data as often as you like. you could also implement some update mechanism. App would be more secure and harder to hack.

I think Excel freezes when you try to connect to some outside resource and this way you would control everything.

你对谁都笑 2024-08-01 22:43:44

您是否从获取此应用程序的用户需求开始? 听起来他们一开始并不想要一个网站。 听起来他们想要一个带有宏的 Excel 电子表格。

Did you start by getting user requirements for this application? It doesn't sound like they wanted a website to begin with. Sounds like they wanted an excel spreadsheet with macros.

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