下面的链接提供了可以在 powershell 中使用的 excel 中的粘贴类型列表
https://docs.microsoft.com/en-us/office/vba/api/excel.xlpastetype
以及下面的参考,其中应用了 powershell 的粘贴类型:
Excel 和 PowerShell - 使用 VLOOKUP 的 PasteSpecial 失败
图片有粘贴类型吗?或者有没有办法使用powershell将图片粘贴到excel中?
下面的链接提供了可以在 powershell 中使用的 excel 中的粘贴类型列表
https://docs.microsoft.com/en-us/office/vba/api/excel.xlpastetype
以及下面的参考,其中应用了 powershell 的粘贴类型:
Excel 和 PowerShell - 使用 VLOOKUP 的 PasteSpecial 失败
图片有粘贴类型吗?或者有没有办法使用powershell将图片粘贴到excel中?
您可以自己查找可能的值:
PS> Add-Type -ASSEMBLY "Microsoft.Office.Interop.Excel" | out-null
PS> [Enum]::GetValues([Microsoft.Office.Interop.Excel.xlPasteType]) |
Select-Object @{n="Name";e={"$_"}},value__
Name value__
---- -------
xlPasteValidation 6
xlPasteAllExceptBorders 7
xlPasteColumnWidths 8
xlPasteFormulasAndNumberFormats 11
xlPasteValuesAndNumberFormats 12
xlPasteAllUsingSourceTheme 13
xlPasteAllMergingConditionalFormats 14
xlPasteValues -4163
xlPasteComments -4144
xlPasteFormulas -4123
xlPasteFormats -4122
xlPasteAll -4104
与发布链接中的表格没有什么不同。(只是订购:追加|sort Name
)