$excel = New-Object -ComObject excel.application
$excel.Visible = $true
$excel.Workbooks.Open("D:\test.xlsx")
1..7 | ForEach-Object -Process {$excel.Cells.Item($_,1).comment.text()}
查看当前的A1-A7的批注

1..7 | ForEach-Object -Process {$excel.Cells.Item($_,1).comment.text(
$excel.Cells.Item($_,1).comment.text() + " +Test_Comment")}
加入 " +Test_Comment"


正文完