2017-11-24 10 views

答えて

1
Not clear how it is implemented with eye share . But the below code works for 
macro calling ; 
$excel = New-Object -comobject Excel.Application  
    $wbPersonalXLSB = $excel.workbooks.open("$env:USERPROFILE\Application 
         Data\Microsoft\Excel\XLSTART\PERSONAL.XLSB") 
    $FilePath = $csvFile 
    $workbook = $excel.Workbooks.Open($FilePath) 
    $excel.Visible = $true 
    $worksheet = $workbook.worksheets.item(1) 
    $excel.Run("PERSONAL.XLSB!your_macro_name") 
    $workbook.save() 
    $workbook.close() 
    $excel.quit() 
関連する問題