Is there a way to run a macro using Office Interop without launching the Excel application?
If i set the Excel application to false it will still show Excel
My code:
private void button1_Click(object sender, EventArgs e)
{
Excel.Application oExcel = new Excel.Application();
oExcel.Visible = false;
oExcel.Run("'c:\\PERSONAL.XLSB'!Module1");
}
No. You need to have MS Office, particularly Excel installed in case you want to run Excel Macros. Server Side Automation of MS Office is not recommended. Please see this link .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.