0

I want export a HTML table into an Excel sheet using IE8 or Outlook. Because i am working in Dynamics CRM Web-Resource, is nothing but a html page.

When i create ActiveXObject as :

var ExcelApp = new ActiveXObject("Excel.Application");

It says that

"Automation server can't create object".

I have changed the setting In IE for ActiveX by going into the Tool-> Internet Option-> Security-> Custom Level.

I have tried this in a web-resource(html page) and

also in .js file(fired onclicking of ribbon button) but still getting same error..:(

Please help me.

Any kind of help would be greatly appreciated.

Anish
  • 588
  • 6
  • 21
  • Please take a look at the right side of this page. You'll find `Related` link list with plenty of similar questions... – Teemu May 25 '13 at 07:44
  • Yes, i found this before posting this question but i did not get the answer, i have tried that mentioned over there..that is why i am posting new question and though i am accessing from CRM that is why i created a new thread.. – Anish May 25 '13 at 07:51
  • Did you read scunliffe's last comment? In that comment there are all reasons, why ActiveX is not working. – Teemu May 25 '13 at 07:56
  • I guess you are talking about this. **1.) the object type doesn't exist (e.g. a typo in the name) or 2.) you don't have permissions for this user, on this site, in this zone** then how to solve this. I need to export a html table into an excel sheet. – Anish May 25 '13 at 07:58
  • Make sure you've selected a correct zone in Security options (epascarello's answer), though I'm not familiar with CRM... Also there are several security items to check, one or two is not enough. – Teemu May 25 '13 at 08:18
  • Hi Teemu, I found that creating new ActiveXObject("Excel.Application") is ok if MS-Excel is installed in your system otherwise it will give error that '**Automation server can't create object.**' I have tried this in other system(MS-Excel installed) and it executed with a just warning. – Anish May 29 '13 at 06:12
  • LOL, so it's reason number one: `1.) the object type doesn't exist...`. – Teemu May 29 '13 at 06:13
  • :).. but instead of this it is throwing something else.. – Anish May 29 '13 at 07:40

0 Answers0