Excel2007ãæä½
PowerShellããExcelãèµ·åãã以ä¸ã®ããã«ã¯ã¼ã¯ããã¯ã追å ãã¦ã¿ãã¨ããã
$app = New-Object -comobject Excel.Application $app.Visible = $True $book = $app.Workbooks.Add()
ãªãããããªã¨ã©ã¼ãã»ã»ã»
"0" åã®å¼æ°ãæå®ã㦠"Add" ãå¼ã³åºãä¸ã«ä¾å¤ãçºçãã¾ãã: "ã©ã¤ãã©ãªã®å½¢å¼ãå¤ãããã¾ãã¯ç¨®é¡ãç¡å¹ã§ãã (HRESULT ããã®ä¾å¤: 0x80028018 (TYPE_E_INVDATAREAD))"
çºçå ´æ è¡:1 æå:27+ $book = $app.Workbooks.Add( <<<< )
ã°ã°ã£ã¦ã¿ããããããªã®ãçºè¦ã
ã©ãããããã°ã§ä»¥ä¸ã®ãããªåé¿æ¹æ³ãããããã§ãããã
$excel = New-object -com Excel.Application $ci = [System.Globalization.CultureInfo]'en-us' $excel.workbooks.psbase.gettype().InvokeMember("Add", [Reflection.BindingFlags]::InvokeMethod, $null, $excel.workbooks, $null, $ci)
ã¯ã¼ã¯ããã¯éãç¨åº¦ã§ããããªã®æ¸ããããªãã§ããã»ã»ã»