Не понимаю, почему этот раздел кода не работает.
144 #Evaluate Column C
145 $COLUMNC = $_.C
146
147 #Find Prepared With:
148 $COLUMNCOUT = $COLUMNC -like "*Prepared*"
149 if($COLUMNCOUT -eq $True){
150 $sheet.Cells.Item($rowcount,"F") = $COLUMNC
151 }
152
153 #Find Contains:
154 $COLUMNCOUT = $COLUMNC -like "*Contains:*"
155 elseif($COLUMNCOUT -eq $True){
156 $sheet.Cells.Item($rowcount,"G") = $COLUMNC
157 }
158
159 else{
160 $sheet.Cells.Item($rowcount,"R") = $COLUMNC
161 }
Я считаю, что то, что у меня есть, написано правильно. Может у меня нет строки 154, где она находится ???
Требуется любая помощь.
ОШИБКА:
elseif : The term 'elseif' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\TEST\Working_Test.ps1:155 char:4
+ elseif($COLUMNCOUT -eq $True){
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (elseif:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
else : The term 'else' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\TEST\Working_Test.ps1:159 char:4
+ else{
+ ~~~~
+ CategoryInfo : ObjectNotFound: (else:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException