【发布时间】:2015-10-12 16:59:17
【问题描述】:
这里是原文:link.
现在我的问题是:
使用 .formula,我可以走得很远,但我有一个非常复杂的公式,它不想工作。
在 Excel 中工作的代码:
=IF(ISBLANK(G2),"",VLOOKUP("*"&LEFT(G2,9)&"*",'\\compname\path\to\excel\[ramdata.xlsx]20151009'!A:B,2,FALSE))
在Powershell中不起作用的代码:
$ws.Cells.Item($intRow,9).Formula = '=VLOOKUP("*"$([char]38)LEFT(G$intRow,5)$([char]38)"*",'\\compname\path\to\excel\[ramdata.xlsx]20151009'!A:B,2,FALSE)'
在我运行 powershell 脚本后,我插入公式的单元格是空白的。
有什么想法吗?
【问题讨论】:
标签: excel powershell excel-formula