당신은 (당신은 상호 운용성을 사용할 수 있습니다)이 코드를 시도 할 수 있습니다
var oExcel = new ApplicationClass();
var oBook = oBooks.Open("c:\\test.xls", oMissing, oMissing,
oMissing, oMissing, oMissing, oMissing, oMissing, oMissing,
oMissing, oMissing, oMissing, oMissing, oMissing, oMissing);
// Launch the macros (his name is Run).
RunMacro(oExcel, new Object[]{"arg1", "arg2"});
// Quit Excel and clean up.
oBook.Close(false, oMissing, oMissing);
System.Runtime.InteropServices.Marshal.ReleaseComObject (oBook);
oExcel.Quit();
And function in order to launch macro
private void RunMacro(object oApp, object[] oRunArgs)
{
oApp.GetType().InvokeMember("Run", System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.InvokeMethod, null, oApp, oRunArgs);
}
당신이 순간에 어떤 코드가 있습니까? – ChrisBint