I am trying to load an Excel file using PowerShell Core for Mac but I am encountering an issue with New-Object
. It's failing on the very first line
$Excel = New-Object -ComObject Excel.Application
This is the error message I receive:
New-Object : A parameter cannot be found that matches parameter name 'ComObject'. At line:1 char:21 + $Excel = New-Object -ComObject Excel.Application + ~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [New-Object], ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
Has anyone encountered this issue and does anyone know how to fix it?