检查Excel的DLL和dynamic加载
我正在使用Microsoft.Office.Interop.Excel将数据写入Excel文件,我在我的机器上安装了Excel 2010。 但是我需要程序在老版本的Excel上运行。
该程序应该检查安装在特定的机器上的版本,并dynamic加载DLL,以免得到一个遗漏参考错误..
If Excel 2003 is available, use it. Else If a higher Excel version is available, use it Else show an error message since this means that Excel is not installed in the machine
有没有办法做到这一点? 我真的很难find一个解决scheme。 任何帮助,将不胜感激。 提前致谢..
使用NetOffice( http://msdn.microsoft.com/en-us/library/bb417255%28WinEmbedded.5%29.aspx ),它确实为所有Office版本提供了一个很好的抽象。
- Excel互操作workbook.SaveAs()删除原始格式?
- 与Windows 2008 R2服务器上的Microsoft.Office.Interop.Excel程序集问题
- 如何使用Excel导出function部署我的应用程序?
- 什么是Excel 97-2003正确的`XlFileFormat`枚举
- 如何将数组从C#(VSTO)项目传递给VBAmacros
- 使用Microsoft.Office.Interop保存用C#创build的文件
- 为什么我不能查询Microsoft.Office.Interop.Excel.Connections?
- 如何使用Interop加载Excel Addin
- 用于学习c#Excel的资源interop