Amen Ra
Amen Ra

Reputation: 2851

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 in JSFiddle:

http://jsfiddle.net/BxV9E/

Upvotes: 0

Views: 1553

Answers (1)

mtazva
mtazva

Reputation: 1015

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.

Upvotes: 1

Related Questions