---
id: post/aardvarklabs-blog/2204
type: post
title: Best Practices for Handling Delimited Data Imports into Business Central
summary: This post explains how to import comma-separated values (CSV) customer data into Business Central by parsing delimited files into a temporary staging table and then creating customer records. It demonstrates best practices for handling unstructured, flat file formats through code examples and provides a complete workflow from file upload to database insertion.
tier: community
language: en
tags:
  - data import
  - csv parsing
  - delimited files
  - staging table
  - customer import
  - al code
  - file handling
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:59:45.957Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: b30825f237500c3dc35b5d54a045a9e6a60156a1b3097dc5413f3758cdbf30e6
evidence:
  - kind: blog
    url: https://aardvarklabs.blog/2025/08/15/best-practices-for-handling-delimited-data-imports-into-business-central/
    title: Best Practices for Handling Delimited Data Imports into Business Central
    date: "2025-08-15"
    commit: null
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/18
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "2204"
source_id: aardvarklabs-blog
source_name: Aardvark Labs
url: https://aardvarklabs.blog/2025/08/15/best-practices-for-handling-delimited-data-imports-into-business-central/
published_at: "2025-08-15T12:00:00.000Z"
author: Marcel Chabot
full_text: false
words: 1729
quotes: []
code_objects_mentioned:
  - table ARD_CustomerStaging
  - page ARDCustomerImport
  - table Customer
systems:
  - development
  - integration
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://aardvarklabs.blog/2025/08/15/best-practices-for-handling-delimited-data-imports-into-business-central/embed/
  image: https://aardvarklabs.blog/wp-content/uploads/2025/08/csvbot.jpg
  image_alt: null
  image_w: 768
  image_h: 768
  site_name: Aardvark Labs
  favicon: https://aardvarklabs.blog/wp-content/uploads/2024/04/design-1.png?w=32
  probed_at: "2026-10-07T11:51:43.507Z"
---

# Best Practices for Handling Delimited Data Imports into Business Central

[Read the post](https://aardvarklabs.blog/2025/08/15/best-practices-for-handling-delimited-data-imports-into-business-central/) · Aardvark Labs (Marcel Chabot) · 2025-08-15 · 1729 words · tier community · reviewed (checked by Opus)

> This post explains how to import comma-separated values (CSV) customer data into Business Central by parsing delimited files into a temporary staging table and then creating customer records. It demonstrates best practices for handling unstructured, flat file formats through code examples and provides a complete workflow from file upload to database insertion.

## Key points

- CSV is an unstructured flat file format where data is separated by delimiters; columns must be static and consistent across file loads
- Use a temporary staging table as an intermediary to import data first, enabling validation, correction, and retry before creating actual records
- Parse CSV files using UploadIntoStream to read the file, split text by line breaks, then split each line by the delimiter character
- Map parsed values to staging table fields using CopyStr to enforce field length limits, and use Evaluate for type conversion like decimals
- Convert validated staging records to actual Business Central records in a separate procedure after successful import

## 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.

- table "ARD_CustomerStaging"
- page "ARDCustomerImport"
- [table 18 "Customer"](../../objects/table/18.md)

Not found in BC28-30: table "ARD_CustomerStaging", page "ARDCustomerImport".

## Context

- Features: File upload dialog, CSV parsing, Temporary staging tables, Text splitting and string manipulation, Data validation and error handling, Automatic record numbering, Field length enforcement

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