Category - Excel
1 Comments   71379 Views
Here Mudassar Ahmed Khan has explained how to export data to Microsoft Excel workbook using ADO.Net and C#
11 Comments   116640 Views
Here Mudassar Ahmed Khan has explained how to read and import data to Microsoft Excel workbook using ADO.Net and C#
122 Comments   314452 Views
Here Mudassar Ahmed Khan has explained how to export GridView to Word Excel PDF and CSV documents
7 Comments   85444 Views
Here Mudassar Ahmed Khan has explained how to export GridView to Word Excel PDF and CSV documents
6 Comments   62514 Views
Here Mudassar Ahmed Khan has explained how to Export a GridView with Images or Pictures to Word Excel or PDF Formats. In this article the GridView is displaying images from SQL Server Database
54 Comments   194313 Views
Here Mudassar Ahmed Khan has explained how to export DataTable or DataSet to Word Excel PDF or CSV formats in ASP.Net
44 Comments   150623 Views
In this article Mudassar Ahmed Khan has explained how to read Excel Sheet and import its data into the ASP.Net GridView control using ADO.Net
40 Comments   174275 Views
Here Mudassar Ahmed Khan has explained how to import Excel Sheet Data into SQL Server Database table using ADO.Net in an ASP.Net Web application
18 Comments   88535 Views
Here Mudassar Ahmed Khan has explained how to export multiple GridViews to the same Excel Sheet using ASP.Net
2 Comments   26639 Views
Here Mudassar Ahmed Khan has explained how to export only selected or checked records or rows to excel sheet using ASP.Net GridView control
3 Comments   45530 Views
Here Mudassar Ahmed Khan has explained how to export only those columns in ASP.Net GridView control that are selected or checked by the user
6 Comments   51198 Views
Here Mudassar Ahmed Khan has explained how to add Excel like AutoFilter feature in ASP.Net GridView Control using DropDownList
4 Comments   31502 Views
Here Mudassar Ahmed Khan has explained how to save the ASP.Net GridView control to Excel sheet on Server's disk using ASP.Net without download prompt.
3 Comments   77307 Views
Here Mudassar Ahmed Khan has explained with an example how to filter data in GridView control with DropDownList in ASP.Net
9 Comments   49514 Views
In this article Mudassar Ahmed Khan has explained with an example and attached sample code, how to Import data from Excel to GridView in ASP.Net.
4 Comments   109597 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to Import Excel Sheet data and records into SQL Server 2005, 2008, 2012 using ASP.Net
0 Comments   9525 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to upload data or records from Excel File after reading sheet contents to SQL Server in ASP.Net.
0 Comments   13303 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to Import or insert Excel Sheet data and records into SQL Server 2005, 2008, 2012 using ASP.Net
3 Comments   38447 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to export ASP.Net Chart Control (Pie Chart) to Excel Sheet using C# and VB.Net
1 Comments   24026 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how we can create charts in Excel File programmatically from code using ASP.Net Chart Control with C# and VB.Net.
The Chart control can be easily populated from database using DataTable.
0 Comments   41360 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code,how to export ASP.Net GridView control with Caption or Title to Excel file using C# and VB.Net.

GridView by default has a caption property but the problem is that it does not have much option of styling and alignment. Hence I have developed a trick where I am making use of Panel control and then exporting the Panel control to Excel file
0 Comments   46646 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to filter ASP.Net GridView control records using DropDownList control in HeaderTemplate or Header Row.
0 Comments   17640 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to export selected GridView rows to excel file in ASP.Net
7 Comments   78340 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to export all pages of GridView which has Paging (Pagination) enabled using AllowPaging property to Excel file in ASP.Net using C# and VB.Net.
18 Comments   254877 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to export GridView to Excel file in ASP.Net with formatting and styles using C# and VB.Net.
0 Comments   25830 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to hide some columns when exporting GridView to Excel in ASP.Net
2 Comments   22132 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, GridView with BoundField or TemplateField with Label can be exported easily and also displays properly. Problem occurs when the GridView with TemplateField Column contains controls like HyperLink, TextBox, Button, LinkButton, RadioButton or CheckBox controls. When such case occurs we need to convert remove these controls and replace them with Label or Literal controls.
0 Comments   36286 Views
Here Mudassar Ahmed Khan has explained with an example and attached sample code, how to export GridView with TemplateField Column contains controls like HyperLink, TextBox, Button, LinkButton, RadioButton or CheckBox controls to Excel File after removing them.
1 Comments   13690 Views
Here Mudassar Ahmed Khan has explained how to export GridView to Excel without losing GridLines in Exported Excel file in ASP.Net using C# and VB.Net.
Here Mudassar Ahmed Khan has explained the solution to the warning / error “The file you are trying to open is in a different format than specified by the file extension”, that one gets when he tries to open the Excel file that was generated when exporting GridView to Excel.
19 Comments   212685 Views
Here Mudassar Ahmed Khan has explained how to upload Excel File and then read and import its data into DataSet or DataTable using C# and VB.Net in ASP.Net Web Application.

The imported Excel File data is then displayed in ASP.Net GridView control.
3 Comments   71541 Views
Here Mudassar Ahmed Khan has explained how to read Excel File using OLEDB Data Provider Connection in C# .Net. Excel Workbook is just like database with sheets corresponding to tables.
This article covers reading of both Excel 2003 as well as OpenXML i.e. Excel 2007, 2010 and 2013 formats.
Here Mudassar Ahmed Khan has explained how to resolve the error The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. This error occurs when you try to make use of Excel 2007 or higher or Access 2007 or higher files using OLEDB connection in C# or VB.Net.

This happens only for Office 2007 or higher as it requires use of OLEDB ACE drivers for connection which do not come by default in Windows and hence we need to install them in order to get rid of this error.
6 Comments   83763 Views
Here Mudassar Ahmed Khan has explained how to insert data from Excel sheet into SQL Server database table using SqlBulkCopy in C# and VB.Net.

SqlBulkCopy class as the name suggests does bulk insert from one source to another and hence all rows from the Excel sheet can be easily read and inserted using the SqlBulkCopy class.
Here Mudassar Ahmed Khan has explained how to export GridView Data to Excel using OpenXml library in ASP.Net using C# and VB.Net.
This article uses ClosedXml library along with OpenXml as ClosedXml is a wrapper library of OpenXml and makes it easier to use.
4 Comments   38238 Views
Here Mudassar Ahmed Khan has explained how to export data (records) from SQL Server Table to Excel file in ASP.Net using C# and VB.Net. This article will work for all SQL Server versions i.e. 2005, 2008, 2008R2, 2012, etc.

The data will be first fetched into a DataTable and then the DataTable will be exported into an Excel Sheet using OpenXml and ClosedXml Excel libraries.
3 Comments   37022 Views
Here Mudassar Ahmed Khan has explained how to copy data from Excel file or Clipboard and paste it to GridView in ASP.Net using C# and VB.Net.

We cannot paste the copied data from Excel file or Clipboard to GridView and hence we need to paste the data to an ASP.Net Multiline TextBox or TextArea and then populate GridView.
Here Mudassar Ahmed Khan has explained how to import data from Excel file’s sheet and display in DataGridView control in Windows Forms (WinForms) application using C# and VB.Net.

The Excel sheet data will be read into a DataTable which is then used to populate the DataGridView control.
1 Comments   38603 Views
Here Mudassar Ahmed Khan has explained how to create an Excel file using the data (records) from SQL Server Table and then download it in ASP.Net using C# and VB.Net.
2 Comments   26477 Views
Here Mudassar Ahmed Khan has explained how to read and display data from a sheet of an Excel file (.xls and .xlsx) and display it in ASP.Net using C# and VB.Net.
0 Comments   30434 Views
Here Mudassar Ahmed Khan has explained how to write (insert) data to Excel file Sheet (.xls and .xlsx) in ASP.Net using C# and VB.Net.
The data from database will be written (inserted) into the Excel file Sheet (.xls and .xlsx) and the file will be downloaded in ASP.Net.
0 Comments   17967 Views
Here Mudassar Ahmed Khan has explained with an example, how to populate (display) data in in GridView based on DropDownList Selected value (Selection) in ASP.Net using C# and VB.Net.
The GridView data will be populated when the DropDownList selected item is changed.
0 Comments   7578 Views
Here Mudassar Ahmed Khan has explained with an example, how to export Image to Excel file in ASP.Net using C# and VB.Net.
0 Comments   5093 Views
Here Mudassar Ahmed Khan has explained how to read and import Excel file (Excel sheet) data to GridView without using OELDB in ASP.Net using C# and VB.Net.
Since OLEDB is not used, the Excel file (Excel sheet) data will be read and imported to GridView using OpenXml library in ASP.Net using C# and VB.Net.
2 Comments   11128 Views
Here Mudassar Ahmed Khan has explained with an example, how to read and import Excel file (Excel sheet) data to DataTable using OpenXml in ASP.Net with C# and VB.Net.
0 Comments   15459 Views
Here Mudassar Ahmed Khan has explained with an example, how to read and import Excel file (Excel sheet) data to GridView using ClosedXml library in ASP.Net using C# and VB.Net.
0 Comments   6666 Views
Here Mudassar Ahmed Khan has explained with an example, how to export GridView data to multiple Sheets (Worksheets) of same Excel file in ASP.Net using C# and VB.Net.
Records of each page of GridView with paging enabled will be exported to a different Excel sheets (worksheets) using ClosedXML and OpenXml Libraries.
0 Comments   7305 Views
Here Mudassar Ahmed Khan has explained with an example, how to export multiple DataTables of a DataSet to multiple Excel Sheets (Worksheets) in ASP.Net using C# and VB.Net.
Records of each DataTable in the DataSet will be exported to a different Sheet (Worksheet) of an Excel file using ClosedXml library in ASP.Net.