我应该怎么做才能在asp.net中正确使用closedxml? [英] what should i do for working with closedxml correctly in asp.net
问题描述
我正在Webform上使用gridview,并且我想使用asp.net c#将数据从SQL Server导出到excel,并且我正在使用ClosedXML.Excel,但错误是
I'm using gridview on my webform and I want to export data from SQL server to excel using asp.net c#, and I'm using ClosedXML.Excel but the error is
找不到类型或名称空间名称"ClosedXML"(您是 缺少using指令或程序集引用?)
The type or namespace name 'ClosedXML' could not be found (are you missing a using directive or an assembly reference?)
我如何删除它?
推荐答案
这是因为尚未安装软件包,因此没有适当的DLL.由于没有DLL,您将收到此错误.首先,您需要在 此处 中使用NuGet安装软件包.然后相应地引用它.要安装该软件包,只需
It because you have not installed the package therefore you don't have the appropriate DLLs. Due to not having the DLLs you are receiving this error. Firstly you will need to install the package using NuGet as mentioned here and then reference it accordingly. To install the package just do
Install-Package ClosedXML
安装软件包后,只需
using ClosedXML;
这篇关于我应该怎么做才能在asp.net中正确使用closedxml?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!