powershell脚本可自动执行无法执行Vlookup
功能的excel功能,
我输入了两张Excel文件
**sheet1** - machinename,status
**Sheet2** - machinename,lastlogontime
我需要在 sheet2 中进行vlookup才能从
获取状态sheet1=VLOOKUP(A2,final!A:B,2,FALSE)
我想在以下代码的 powershell 中使用相同的公式。
下面的代码给出错误“您不能在空值表达式上调用方法”
$v1 = "VLOOKUP(A2,'C:\Users\vtamilar\Desktop\UK[final.xlsx]'final!`$A:`$B,2,FALSE)"
$wb2.cells.item(2,3).value2 = $v1