Book a Demo

Author Topic: Excel COM Object works with JScript but not with Javascript  (Read 2652 times)

mohannad

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Excel COM Object works with JScript but not with Javascript
« on: February 15, 2022, 10:03:01 pm »
I'm getting this error when i'm trying to create Excel COM Object for a script written javascript :



but it's working fine within a jscript, any ideas why?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13486
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Excel COM Object works with JScript but not with Javascript
« Reply #1 on: February 15, 2022, 10:14:13 pm »
The have another syntax to do that.

Ther are a few posts on this forum about that.

Geert

mohannad

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Excel COM Object works with JScript but not with Javascript
« Reply #2 on: February 15, 2022, 10:36:52 pm »
The have another syntax to do that.

Ther are a few posts on this forum about that.

Geert

Hello Geert,

I know that Javascript uses another API (which is the one in the snapshot). Also, I'm sure that this is the correct syntax since using other PorgId(s) works fine.
For instance, If I replace the excel progId with "WScript.shell" it works just fine. So, I thought this might be related to this particular application.

Thanks
« Last Edit: February 15, 2022, 10:42:30 pm by mohannad »