如何使用JavaScript查找客户端计算机的Excel版本 [英] How to find the Excel version of client machine using JavaScript

查看:84
本文介绍了如何使用JavaScript查找客户端计算机的Excel版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要使用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.

推荐答案

您需要编写Javascript
You need to write Javascript
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版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆