开发者

Why is Export to Excel and CSV javascript function not working?

开发者 https://www.devze.com 2023-03-14 04:30 出处:网络
I am trying to export an html table to excel using JavaScript. However I keep getting the following error.

I am trying to export an html table to excel using JavaScript. However I keep getting the following error.

ActiveXObject is not defined
[Break On This Error] var ExcelApp = new ActiveXObject("Excel.Application"); 

Here is a link to my code开发者_Python百科 in JSFiddle:

http://jsfiddle.net/BxV9E/


I presume you are receiving the following JavaScript error (or similar - I captured in IE9)?

SCRIPT429: Automation server can't create object

I believe you'll find that the script works fine when run locally, but not from a remote location. This is a restriction in your IE settings. Not sure what you need to change, but check for OLE Automation or some other scripting permission setting.

0

精彩评论

暂无评论...
验证码 换一张
取 消