在C#.NET下实现数据导入Excel的方法研究  被引量:18

Research on Method of Export Data into Excel in C# .NET

在线阅读下载全文

作  者:苏庆[1] 李忠良[1] 吴伟民[1] 

机构地区:[1]广东工业大学计算机学院可视计算实验室,广东广州510006

出  处:《计算机与现代化》2011年第4期29-31,共3页Computer and Modernization

摘  要:在C#.NET下将DataGridView中的数据导入Excel表格,常用的方法是通过Excel的COM组件来实现在C#中和Excel交互。由于开发计算机和用户计算机上安装的Excel版本不同,经常会导致不兼容的现象。为了解决这个问题,本文提出利用反射技术来实现C#和Excel交互。在安装不同版本的Excel的机器上进行实验,结果表明该方案很好地解决版本兼容性问题。In C#.NET,the commonly method of export the data in the component of DataGridView into Excel uses the Excel's COM component to achieve it.But because the vision of Excel between the development machine and user's machine installed maybe different,this method often leads to the phenomenon of incompatible.To solve this problem,the reflection technique is proposed to implement the interaction of C# and Excel.Through the experiment on the computer with different visions of Excel,the results show that this method can solve the problem of version compatibility very well.

关 键 词:反射 COM组件 EXCEL 

分 类 号:TP311.131[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象