Powershell 7 does not recognize the Cells() Excel method


Viewing 0 reply threads
  • Author
    • #1555887
      Ramon Tan
      Member Points: 764
      Rank: 2

      I have several scripts under PS 5.1 that work fine with code like

      $worksheet.Cells(2,2).Value = "Bob"

      but when I run them under PS 7, I get the message:

      Method invocation failed because [System.__ComObject] does not contain a method named 'Cells'

      Is this due to the use of .NET Core in PS7?
      Will using the -UseWindowsPowerShell parameter of Install-module to reinstall the ImportExcel module fix this?
      Would be greateful for any advice or tips.  Thanks in advance.


      • This topic was modified 1 year, 9 months ago by Ramon Tan.
Viewing 0 reply threads
  • You must be logged in to reply to this topic.
© 4sysops 2006 - 2022


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account