Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
正如标题所暗示的,我不确定如何使用 Powershell 仅选择行的一部分并插入单元格(向下移动行)。似乎所有在线教程都是关于插入整行或整列,这不是我想要做的。
有任何想法吗?
谢谢。
尝试这样的事情:
$xl = New-Object -COM "Excel.Application" $xl.Visible = $true $wb = $xl.Workbooks.Open "C:\path\to\your.xlsx" $ws = $wb.Sheets.Item(1) $ws.Range("C5:E9").Insert(-4121)