How to use this .dll

Sep 14, 2009 at 3:06 PM


I downloaded this .dll, but wondering how can I use it in my code! please advice

Mar 25, 2010 at 7:28 AM

Its very simple.. Drag and drop on to your page which had the grid view..
in the ID property of this control add the Name of the Grid you have given in the code thats it

Apr 14, 2010 at 9:20 PM

Thank you very much


Apr 18, 2011 at 5:32 PM

It's my first time using this. What do I drag and drop onto my page? The dll? When I do that, it adds an href to the dll to the page. So when i click on the link, it tries to open the dll! Could somebody please advise?

Apr 18, 2011 at 6:27 PM

OK got it, Was just not thinking the right way.

May 27, 2011 at 12:26 AM

When I try to drag file directly from desktop to asp page in sharepoint i get couldnt open file C:documents and setting\nfrenette\local setting\tempory internet files\webtempdir\wp0xkv7o.dll.l

May 27, 2011 at 7:48 PM
atarach wrote:

OK got it, Was just not thinking the right way.

What did you do? I guess I'm not thinking?

Jul 22, 2011 at 7:09 PM

I would also like to know step-by-step how to impliment the control in VB code.

I put the .dll into the /bin directory, then dragged it onto my .aspx page using Visual Web Developer Express 2010 but all I got was a link to the file.

Feb 12, 2012 at 3:44 PM

I ran into the same problem: when I dragged the DLL onto the webform it just created a link to the DLL. Here is what worked for me:

Put the following on line two of your aspx file (right below the page directive)

<%@ Register TagPrefix="asp" Assembly="ExportToExcel" Namespace="KrishLabs.Web.Controls" %>

You will need to create a Gridview on the same page and bind data to it if you haven't already done so on your ASPX file. Then add at this line into your ASPX file where you would like the button to show up:

<asp:ExportToExcel runat="server" ID="ExportToExcel1" GridViewID="gvYourGridViewName" ExportFileName="ExportFileName.xls" Text="Export to Excel" IncludeTimeStamp="true" />

Be sure to change the GridViewID property to the ID of your GridView. Hope this helps and save some time!

PS - I discovered the namespace of the DLL using ildasm.exe which is included in the Visual Studio (specially SDK) install.


Jun 8, 2012 at 1:45 AM

Hey, AWESOME control, THANK YOU!

I think I can make a more clear instruction for ease of use:

  1. drag and drop the .dll into the toolbox, this creates the control
  2. drag the new Export to Excel control onto the page
  3. find the control code and add this attribute: GridViewID="TheGridViewName"
  4. Dont forget to go into your bin folder and copy the new .dll into your production server.


Jun 8, 2012 at 2:09 AM
Edited Jun 8, 2012 at 9:40 PM

The ColumnsToExclude property does not work for me. It shows up in the control properites window, I can edit it, I get no errors, but it just does not eliminate any columns.  Any tips to make it work?

UPDATE: I learned how to do this.  Read the tool tip memo on the Visual Studio control properties window when you highlight the property.  It explains that the column exclusions is index based [0].  Example: 0,9,10,11,12...

Jul 11, 2013 at 3:31 PM
In Visual Studio 2012 to use this.
  1. In the toolbox right click on a tab and select "Choose Items".
  2. Then click browse when the screen loads.
  3. Find the dll and click open.
  4. You will now see the control. Select it and press "Ok".
  5. Drag and drop it on your page...viola!
Make sure you include the DLL in your bin file and rebuild your project or you will have errors thrown.
Jul 12, 2013 at 2:14 PM
1) How to use this in the and not in ASP.NET
2) Is it possible to Bind the dataset alone to export to excel
3) What is the Maximum capacity, I have nearly around Half a million record to upload from the dataset to excel. I am trying for the best solution to upload in much more faster way.
4) Should not change the format of the data