Fast Export Data from Database to Excel and Generate Chart without Automation

Before I got this blog, I submitted this post to Dotnetspark.com and Programmers.com. Now, I share it in my new blog and hope that this post can be helpful for people who need to export data to Excel.

Introduction

This article introduces a Wizard which is used to export data from database and shows the guide to use it. This Wizard can used both by programmers and general users.

Background

In this example, I export the data about customers' information of 2008 from database to Excel and then generate chart based on the parts of data without Automation quickly. Before using the following method to export data, we need to install .Net Framework 2.0 and free Spire.DataExport firstly.

The following tables are the parts of customers' data.

Simple Steps

1. Select a database.

2. Select data source from database. In the example, I choose Table.

3. Select essential columns to export.

4. Select the Chart type. There are three types: Column Chart, Bar Chart or Line Chart, can be chosen.

Step in Details

Step 1: select Database.

Choose the database which saves the customers' information. Then input the connection string to connect to the database.

Step 2: Get the data source.

Select Data Source firstly. I choose Table. Then, select the table named customers.

Step 3: Select the columns I need to export. In this example, I just only need two columns, Name and Shopping Quantity.

Step 4: Select the Chart Type. In order to display the data clearly, I choose BarChart.

After clicking Finish, we can get the Excel Worksheet as following:

Conclusion

This method can be used to export data from database into Excel and generate charts efficiently. In this method, we use one small tool, named DataExportWizard to export data simply, which originates from the free data export component. You can click here to download the free component.

If you want to download this Wizard, you can visit this link: http://www.dotnetspark.com/kb/3716-fast-export-data-from-database-to-excel.aspx

The other link source: http://www.programmersheaven.com/user/Rinia09/blog/6766-Fast-Export-Data-from-Database-to-Excel-and-Generate-Chart-without-Automation/

Lijiang, City in My Dream

There is one city, not big but peaceful. There is one city, not luxuriant but beautiful. There is one city, not fashion but innocent. The people in the city is not talented but friendly. The food in the city is not abundant but delicious. Several years later, if I can give up everything I have owned. I will live in the city to enjoy its gentle warmth.

The city is called Lijiang. It locates in Yunnan Province, China.