---
id: post/aardvarklabs-blog/2838
type: post
title: Importing Multi-Tab Excel Files into Business Central
summary: This post explains how to import multi-tab Excel files into Business Central with a header/line relationship structure. It provides code examples using AL to read separate header and line sheets, maintain relational integrity with a dictionary-based key mapping system, and populate staging tables.
tier: community
language: en
tags:
  - data import
  - excel
  - multi-tab
  - relational data
  - al coding
  - header-line structure
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:57:58.506Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 7144d182ec56e1e61bd1b98809c29bce2a0a60bacd6bfd9c4934c6867b5beceb
evidence:
  - kind: blog
    url: https://aardvarklabs.blog/2025/12/05/importing-multi-tab-excel-files-into-business-central/
    title: Importing Multi-Tab Excel Files into Business Central
    date: "2025-12-05"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://aardvarklabs.blog/2025/12/05/importing-multi-tab-excel-files-into-business-central/
    title: Importing Multi-Tab Excel Files into Business Central
    date: "2025-12-05"
    commit: null
    t: null
    quote: With Header/Line, or any other relational data, we have the challenge of relationship management.
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "2838"
source_id: aardvarklabs-blog
source_name: Aardvark Labs
url: https://aardvarklabs.blog/2025/12/05/importing-multi-tab-excel-files-into-business-central/
published_at: "2025-12-05T13:00:00.000Z"
author: Marcel Chabot
full_text: false
words: 774
quotes:
  - text: With Header/Line, or any other relational data, we have the challenge of relationship management.
    why_it_matters: Establishes the core problem that multi-tab Excel imports must solve when dealing with related data structures
code_objects_mentioned:
  - page ARDMultiTabImport
  - table ARD_SalesHeader
  - table ARD_SalesDetail
systems:
  - integration
  - development
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://aardvarklabs.blog/2025/12/05/importing-multi-tab-excel-files-into-business-central/embed/
  image: https://aardvarklabs.blog/wp-content/uploads/2025/08/0abb2327-be7c-437f-965b-121c89c8b7b7.jpg
  image_alt: null
  image_w: 1024
  image_h: 1024
  site_name: Aardvark Labs
  favicon: https://aardvarklabs.blog/wp-content/uploads/2024/04/design-1.png?w=32
  probed_at: "2026-10-07T11:51:16.607Z"
---

# Importing Multi-Tab Excel Files into Business Central

[Read the post](https://aardvarklabs.blog/2025/12/05/importing-multi-tab-excel-files-into-business-central/) · Aardvark Labs (Marcel Chabot) · 2025-12-05 · 774 words · tier community · reviewed (checked by Opus)

> This post explains how to import multi-tab Excel files into Business Central with a header/line relationship structure. It provides code examples using AL to read separate header and line sheets, maintain relational integrity with a dictionary-based key mapping system, and populate staging tables.

## Key points

- Use Excel's sheet-specific tab reading to separate header and line data while maintaining relationships
- Store mapping keys in a Dictionary to connect header records with their corresponding line items without excessive lookups
- Read each sheet independently using TempExcelBuffer.OpenBookStream() with the sheet name parameter
- Process headers first, then lines, using the stored keys to establish parent-child relationships

## Quotes

- "With Header/Line, or any other relational data, we have the challenge of relationship management." (Establishes the core problem that multi-tab Excel imports must solve when dealing with related data structures)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- page "ARDMultiTabImport"
- table "ARD_SalesHeader"
- table "ARD_SalesDetail"

Not found in BC28-30: page "ARDMultiTabImport", table "ARD_SalesHeader", table "ARD_SalesDetail".

## Context

- Features: Excel file import with multiple sheets, Dictionary-based key mapping, TempExcelBuffer sheet management, File streaming and parsing, Header-line relationship management

Source: Aardvark Labs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
