Access skillfully merges multiple Excel files

Source: Internet
Author: User

Merging multiple Excel worksheets is a common task and, of course, there are a number of techniques to help you accomplish this task. The following is an easy way to combine multiple Excel files with access.

Create a link to an Excel workbook in Access: Select External data-Import--excel in Access

In the Get External Data dialog box, select Link to data source by creating a linked table.

You must repeat the process for each Excel workbook until you link them to the database. The results are shown in the following figure.

Start a new query in SQL view and click Create-Other-query design.

Select SQL view in Query tools-design

In SQL view, enter a SELECT statement for all linked Excel tables, use the union operator between each SELECT statement, and enter the SELECT query statement in SQL view

After you run the query, the result will be data that is fetched and merged from all linked files. (www.3lian.com)

As long as the linked Excel file is in the same location, Access automatically refreshes the link to get the latest data each time you open the database. This means you only need to set it once, and then run the federated query each time you need to regroup the Excel file.

By default, however, the Union operator removes any duplicate rows from the data. If you know that there are duplicate rows in your data and you want to keep them, you need to use union ALL to allow repeat rows to be passed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.