Written
October 16, 2009
Hi,
I just tried to enter an array int e new created excel worksheet in PowerShell:
$NumLines = $all.count # all is my array to be stored
$xl = CreateObject("Excel.Application")
ERROR 1
The term 'CreateObject' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
Bei Zeile:140 Zeichen:23
+ $xl = CreateObject <<<< ("Excel.Application")
$xl.visible = $true
$x1
$wb = xl.workbooks.add
The term 'wb.Worksheets' is not recognized as the name of a cmdlet, function, script file, or operable program. Chec
k the spelling of the name, or if a path was included, verify that the path is correct and try again.
And now - of course - everything else fails:
$wb
$ws = wb.Worksheets(1)
$ws
$r = $("A1:P" + $NumLines)
$r
$ws.Range($r).Value = $all
You wrote that it is powershell code - no?