问题描述
大家好,
我需要使用JavaScript查找客户端计算机的Excel安装版本.
要求:
我正在生成一些Excel报告.我想基于客户端计算机中安装的Excel版本更改excel扩展名.
有什么办法可以找到客户端计算机上安装了哪个版本的MicroSoft Excel. [不是服务器计算机.]
请让我知道该怎么做.
在此先感谢.
Hi All,
I have requirement of finding the Excel installed version of Client machine using JavaScript.
Requirement:
I am generating some excel reports. i want to change the excel extension based on Excel version installed in the client machine.
Is there any way to find which version of MicroSoft Excel is installed in client machine. [Not the Server machine.]
Please let me know how to do that.
Thanks in Advance.
推荐答案
var Excel = new ActiveXObject("excel.application"); //Create EXCEL object
Excel.Visible = true;
Excel.Workbooks.Add();
alert( Excel.version );
Excel.Quit();
Excel = null;
//仅在IE中支持ActiveXObject
如果出现类似"自动化服务器无法创建对象"的错误,请选中此 [^ ]
//ActiveXObject support only in IE
if you get error like "Automation server can''t create object" then check this[^]
这篇关于如何使用JavaScript查找客户端计算机的Excel版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!