如何将Excel双工作表数据合并导入InDesign?含下拉联动需求
Absolutely, this is totally doable! The key here is to first structure your Excel data so InDesign can pull all the linked info in one go. Let me break down the exact steps using your test file InDesign-Merging XLSX file:
InDesign’s Data Merge tool works best with a single, flat data source, so we’ll add a column to Sheet1 (Main) that automatically pulls the matching sub_info from Sheet2 (SubInfo) using an Excel formula:
- Open your Excel file, go to Sheet1, and insert a new blank column (e.g., Column C). Name the header
Sub_Info(or a label that fits your content). - In cell C2 (the first row under the new header), enter this formula:
=VLOOKUP(B2, Sheet2!A:B, 2, FALSE)
Here’s what each part does:B2refers to the cell with your dropdown-selected Title in Sheet1Sheet2!A:Btargets the range in Sheet2 where Column A holds your Title list and Column B has the correspondingsub_info2tells Excel to pull data from the second column of that range (yoursub_info)FALSEensures we only get exact matches for the selected Title
- Drag the formula down to fill all rows in Column C. Now Sheet1 will auto-populate the correct
sub_infoevery time you pick a Title from the dropdown.
- Open your InDesign document (or create a new layout for the merged content).
- Go to Window > Utilities > Data Merge to open the Data Merge panel.
- Click the panel’s top-right menu icon, select Select Data Source, then navigate to your InDesign-Merging XLSX file. When prompted, choose Sheet1 as your data source and click Open.
- You’ll now see all your Sheet1 fields (including the new
Sub_Info) listed in the panel.
- On your InDesign page, create or select text boxes where you want the Title and
sub_infoto appear. - Place your cursor inside the text box for the Title, then double-click the
Titlefield in the Data Merge panel. It will insert a placeholder like<<Title>>. - Repeat for the
sub_infoarea: place your cursor, double-click theSub_Infofield to insert<<Sub_Info>>.
- Click the Preview button (the eye icon) at the top of the Data Merge panel. Use the left/right arrows to cycle through different Title selections and confirm the corresponding
sub_infoshows up correctly. - Once you’re satisfied with the preview, click the panel’s top-right menu again and select Create Merged Document. Adjust settings (like merging into a single multi-page document or separate files) as needed, then click OK to generate your final merged content.
A quick side note: If you don’t want to modify your Excel file, you could use an InDesign script to pull data from both sheets, but that’s far more complex. The Excel prepping method above is the simplest, most reliable approach for most users.
内容的提问来源于stack exchange,提问作者Thomas BP




