1

Pythonでpywin32経由でExcels Solverアドインを実行しようとしています:

import win32com.client
from win32com.client import constants as c

app = Dispatch("Excel.Application")
app.Visible = True
app.Workbooks.Open(r'C:\path\to\testsolver.xlsm')
app.Run("runsolver")

..しかし、次のエラーが発生します。

"Cannot run the macro 'runsolver'. The macro may not be available in this workbook or all  macros may be disabled"
4

1 に答える 1