【发布时间】:2017-05-12 03:01:54
【问题描述】:
有人能告诉我如何使用 PowerShell for Excel 2016 执行插入吗?
我试过这个:
$erow = $ws.(1,1).entirerow
$active = $eRow.activate()
$active = $eRow.insert([microsoft.office.interop.excel.xlDirection]::xlDown)
【问题讨论】:
-
“插入”到底是什么意思?你希望代码 sn-p 做什么,它实际上做了什么?
-
[void]$ws.Range($ws.cells(1,1), $ws.cells(1,1)).EntireRow.Copy() [void]$ws.cells( $rowNumberToInsert,1).Insert()
标签: excel powershell powershell-3.0 excel-2016