在C#中将datagridview导出到Excel工作表时出错 [英] Error in export datagridview to Excel sheet in c#

查看:101
本文介绍了在C#中将datagridview导出到Excel工作表时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在C#中将datagrid视图导出到excel工作表,但是它的错误

Error 1 The type or namespace name ''Office'' does not exist in the namespace ''Microsoft'' (are you missing an assembly reference?)

您可以帮我吗?

I try to export datagrid view to excel sheet in c# but its error

Error 1 The type or namespace name ''Office'' does not exist in the namespace ''Microsoft'' (are you missing an assembly reference?)

can you help me?

推荐答案

错误消息是自解释的.您缺少Office程序集参考.请添加相关程序集的引用,您的代码将继续进行.
The error message is self explainatory. You are missing the Office assembly reference. Please add reference of the relevant assembly and your code will proceed further.


这篇关于在C#中将datagridview导出到Excel工作表时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆