如何通过JavaScript生成Excel [英] how to generate Excel through Javascript
本文介绍了如何通过JavaScript生成Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
(它也应该是浏览器兼容的)
解决方案
你可以生成任何你喜欢的,但问题是 - 你要把它呈现给用户吗?如果您的JS在浏览器中运行,您将无法进行保存为对话框,甚至在同一窗口中打开它。除非您使用某些ActiveX控件,否则这是一个仅适用于IE的解决方案,它也将在用户开始工作之前向用户提供一些确认提示。
Is there any way to generate Excel/CSV through Javascript? (It should be browser compaatible too)
解决方案
You can generate whatever you like, but the question is - how are you going to present it to the user? If your JS runs in the browser, you won't be able to make a save-as dialog box or even open it in the same window. Not unless you use some ActiveX controls, but that's an IE-only solution which will also give the user a few confirmation prompts before it starts to work.
这篇关于如何通过JavaScript生成Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文