what should i do for working with closedxml correctly in asp.net [duplicate]

送分小仙女□ 提交于 2019-12-13 10:06:20

问题


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

The type or namespace name 'ClosedXML' could not be found (are you missing a using directive or an assembly reference?)

How could I remove this?


回答1:


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 

Once you have installed the package just do

using ClosedXML;


来源:https://stackoverflow.com/questions/27507242/what-should-i-do-for-working-with-closedxml-correctly-in-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!