PSだとこう
rubyやpythonだとどうなるのかね?
$app = New-Object -ComObject Excel.Application
$app.DisplayAlerts = $false
Get-ChildItem -Path "D:\tmp\" -Recurse -Filter "*.xlsx" |
where { $_.Name -match "^2018-\d\d-\d\d\.xlsx" } |
foreach {
$book = $app.Workbooks.Open($_.FullName)
$sheets = $book.Worksheets | where { $_.Name.StartsWith("tmp") }
$sheets | foreach { $_.Delete() | Out-Null }
$book.Close($true)
}
$app.Quit()
探検
Excel VBA 質問スレ Part53
■ このスレッドは過去ログ倉庫に格納されています
538デフォルトの名無しさん
2018/05/05(土) 23:42:21.67ID:LkKePK4y■ このスレッドは過去ログ倉庫に格納されています
