excelの不要シートを削除する処理を考えました。
しかし、どうしても削除が途中で止まってしまいます。
wf:
Excel Application Scope : VTemp02 +VTempF02 <絶対パスとファイル名の変数
assgin:
VAllsheets = VWb01.GetSheets.ToArray >VAllsheetsはstring
VWb01はworkbookapplication
for each 以降でifを入れ削除対象外のsheetを指定
以下処理
エラー:The sheet does not exist.
また、enter : Cannot find the UI element corresponding to this selector: "またとなります。
再度考え.netでsheet削除を考えました。
上記のfor each 以降でifを入れ削除対象外のsheetを指定までは同様で削除処理を.net利用にしました。
invoke code
edit argumentsに、
name: item
direction: in
type: string
value: item.tostring
code:
Dim ws As Microsoft.Office.Interop.Excel.Worksheet
ws=CType(wb.Sheets(item.tostring),Microsoft.Office.Interop.Excel.Worksheet)
ws.Delete()
invoke code で文法エラーとなります。
2点指定したシート削除の方法考えましたがうまくいきません。
ご教示いただければと思います。