怎么在c#里打开一个excel文件然后调用vba代码?请写出详细步骤。分不够再加!!!
解决方案 »
- c# 调用vc++6.0 问题。帮看下改的对不对。
- 两个DataSet或DataTable有没有办法查出限定的结果。
- winform datagridviewcheckboxcolum问题
- CrystalReport显示与隐藏
- 图书部分代码编写
- 向.php网页提交中文出现乱码,请问自己解决?急啊
- 高手们,求一个C#上传文件的问题,分全给了,在线等,谢谢
- 如何遍历页面上的多个浏览控件
- 初学,为什么创建的web窗体,在预览时看不到控件,只能看到文本???
- C# 中webBrowser如何模拟人工点击提交
- dundas打包之后不能在其他的电脑上使用
- 求救,页面使用了dojo,但有dojo参数设置的element却不能使用getAttribute了
http://blog.csdn.net/chengking/archive/2005/11/29/539514.aspx
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.
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); 这里的objExcel是你实例化的:Excel.Application