如何在c#里打开一个excel文件然后调用vba代码?请写出详细步骤

fieldset{padding:10px;}

怎么在c#里打开一个excel文件然后调用vba代码?请写出详细步骤。分不够再加!!!怎么在c#里打开一个excel文件然后调用vba代码?请写出详细步骤。分不够再加!!!——解决方案——————————————————–打开Excel讲到DataSet中:http://blog.csdn.net/chengking/archive/2005/11/29/539514.aspx——解决方案——————————————————–Do you want to invoke the VBA inside the Excel? Or does this VBA a standalone application which has no relation to Excel file?If you want to invoke the vba inside the excel file.you can start Excel vba editor and add code into auto_exe part so that whenever you start excel, the vba code will run.——解决方案——————————————————–ExecuteExcel4Macro——解决方案——————————————————–很简单,通过EXCEL对象的Run方法执行Excel文件里的过程(也可以是宏):C# code

objExcel.Run("Macro1", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);漫过心际的孤独,早已蔚然成冰,而你是这个季节里最美的音符。

如何在c#里打开一个excel文件然后调用vba代码?请写出详细步骤

相关文章:

你感兴趣的文章:

标签云: