Showing posts with label Excel. Show all posts
Showing posts with label Excel. Show all posts

Monday 24 September 2012

How to export gridview data to CSV file or Export Gridview data to CSV file using C# or VB.NET | Export Dataset/Datatable to Excel or CSV?

                                Hi Friends, in this article I will explain about How to export GridView data to CSV file or Export Gridview data to CSV file using C# or VB.NET | Export Dataset/Datatable to Excel or CSV?
                               In this article I will explain about how to take the data from database and Display in GridView and save as Excel file.
I will explain using the below example.
                               Take GridView and button and set the GridView id as StudentGridView and button as Button1.

Wednesday 29 August 2012

How to add dynamic controls in VB.NET or C# windows forms | How to add textbox at runtime | How to dynamically add control with loop at Runtime

                       Hi Friends, in this article I will explain about How to add dynamic controls in VB.NET or C# windows forms or  How to add textbox at runtime or How to dynamically add control with loop at Run time.
                       Suppose if we want to add textboxes in the loop then we use this process. Suppose if we to display some number of textboxes then we can’t take the textboxes before run the code. For that time we can display textboxes at runtime. Not only textboxes we can any controls like labels, buttons, checkboxes etc.

Tuesday 21 August 2012

Read data from Excel in VB.NET or C# windows forms | Export data from Excel to Text file

                                    Hi friends, in this article I will explain about how to read the data from excel in VB.NET or C# windows Forms.
                                   I searched so many sites and finally get the solution of how to read the data from excel in VB.NET or C# windows Forms.You can know the How to add dynamic controls in VB.NET or C# windows forms | How to add textbox at runtime | How to dynamically add control with loop at Runtime in the next article How to add dynamic controls in VB.NET or C# windows forms | How to add textbox at runtime | How to dynamically add control with loop at Runtime
For this first we have to add the reference Microsoft.Office.Interop.Excel.
Menu—project—Add reference—COM—Microsoft Excel 12.0 Object Library
Next come to code and imports or using Microsoft.Office.Interop.Excel
© 2012-2018 Aspdotnet-Kishore.blogspot.com. All Rights Reserved.
The content is copyrighted to Kishore and may not be reproduced on other websites without permission from the owner.