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 在 CSV 文件中生成报告。如果满足特定条件,我想更改 CSV 文件特定单元格的颜色,我该如何使用 powershell 来做到这一点。
有一个属性 .Interior.ColorIndex 哟设置 excel 单元格的颜色。
$Cell.Interior.ColorIndex = 3
文档:https ://www.google.com/url?sa=t&source=web&rct=j&url=https://docs.microsoft.com/en-us/office/vba/excel/concepts/cells-and-ranges/突出显示活动单元格行或列&ved=2ahUKEwjr18zrjoXoAhX7wjgGHaPJAsgQFjALegQIBxAB&usg=AOvVaw0nO29xwXGwsQOvHO8O5Fhd