开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜