Excel: import data from multiple sheets automatically
See in this article:
Import data from several sheets of one workbook
Import data from new tabs in a source workbook automatically
Import data from several workbooks into one workbook
There are two main cases when you need to combine data from several sheets:
- Import the same data from several sheets of one workbook (e.g. monthly analytics).
- Import data from several workbooks into one workbook and sheet (e.g. combine suppliers or customers' data in several workbooks into one master sheet).
For each of these cases, you can use Coupler.io and this guide.
Import the same data from several sheets of one workbook
For this purpose, you need to set up a Microsoft Excel data flow and complete the following steps:
- Select "Microsoft Excel" as a source.
- Connect your Microsoft account.
- Select the workbook you would like to import several sheets from.
- Select several sheets you would like to combine data from in the 'Sheets' field:
Note: data from different sheets will be matched by headers. For a unified dataset, columns' names in each of your source workbook's tabs (sheets) must be identical.
See on examples below:
Example #1 (both sources have the same columns):
Example #2 (some columns are the same for both sources, and some are unique for each source):
Import data from new tabs in a source workbook automatically
If you need to connect more sheets in the future and their names have the same pattern, you can specify regular expressions instead of manually selecting sheet names from a list:
Learn more about regular expressions to define what expression you need to specify to fit your needs. Here is the list of most common cases:
- All sheets:
.*
- 2021-01, 2021-02, 2021-03, ...:
2021.+
- 2020-12, 2021-01, 2021-02,...:
202.+
- Dec 2020, Jan 2021, Feb 2021, All 2020, 12-2020, 01-2021:
.*202.$
- All sheets with a name that starts with "sales data":
sales data.+
- All sheets with a name that contains “sales data”:
.*sales data.*
- All sheets with a name that ends with "sales data":
.*sales data
Import data from several workbooks into one workbook
- For each workbook, create a separate Microsoft Excel source in your Coupler.io data flow. See more on Combining data from multiple sources.
- Preview & transform your data based on your needs. For example, this step lets you rename your columns for a unified final dataset, filter/sort the data in any way, add additional formula-based columns, and much more. See more on Preview data and transformation.
- Combine the workbooks into one using the preferred data combining mode.