Getting Data from excel and inserted in to a gridview in asp.net
in my application i want to get the data of a excel which is in a folder in solution explorer. i want to get the data and insert into a gridview. expecailly i want a开发者_JAVA百科 particular colunm in that excel sheet that is i want to show in a gridview for example i set a outlook contact in a excel sheet in that sheet i want only a emailaddress column in a grid view how can i write. thank you
You can use ADO.net to access cells in an excel file, similar to a DB query. This is a bit lighter than trying to use Excel automation objects.
http://support.microsoft.com/kb/316934
You can then use this as a source for your gridview.
精彩评论