Preparing Statement Files for Import
Purpose of Preparing Statement Files for Import
This page explains when and how a royalty statement file must be prepared before import into Reprtoir.
In most cases, statement files provided by Statement Providers are already ready to be imported in their original format.
Opening, editing, or re saving a file unnecessarily is one of the most common causes of corrupted data and failed imports.
This page should only be used when an import error occurs or when the system explicitly indicates that the file structure is not compliant.
The objective is to prevent accidental data corruption while providing clear guidance for legitimate preparation cases.
Core Principle: Do Not Modify Files Unless Required
As a rule:
- Do not open a statement file just to inspect it
- Do not re save a file without a specific reason
- Do not change formats preemptively
Many spreadsheet tools automatically alter:
- date formats
- numeric precision
- decimal separators
- thousand separators
- empty values
- column typing
These changes are often invisible to the user but critical for automated processing.
If an import works without modification, that is always the preferred outcome.
File Types and Safe Handling Rules
Spreadsheet Files (CSV, XLSX)
Spreadsheet based statements are the most common and the most fragile.
Risks introduced by opening and re saving include:
- dates converted to localized formats
- amounts converted to text or rounded values
- mixed formats inside a single column
- automatic trimming or padding of values
If a modification is required:
- apply the smallest possible change
- never reformat entire columns
- never use automatic data cleaning features
- always double check the final file structure
Binary or Structured Files
Some providers deliver binary or structured formats that are not meant to be edited.
Rules:
- never open binary files
- never attempt to convert them manually
- never re save them under another format
If such a file cannot be imported, the issue must be resolved at the provider level.
Header Row Requirements
The header row plays a critical role in mapping and must follow strict rules.
The header must:
- be located on row 1 of the file
- contain one column name per column
- contain unique column names
- reflect the actual data below
The header must not:
- be preceded by informational rows
- contain merged cells
- contain duplicated column names
- contain calculated values
Empty columns are ignored automatically by the system.
If a file contains descriptive text above the actual header, those rows must be removed so that the header becomes the first row.
Numeric Formats and Consistency
All numeric values within a given column must share the same format across all rows.
Key points to verify:
- a single decimal separator is used consistently
- no thousand separators are present
- numbers are not mixed with text values
- empty values are handled consistently
A common error occurs when:
- commas are interpreted as decimals
- dots are interpreted as thousand separators
- spreadsheet software auto converts values on save
Always visually inspect several rows across the file after any modification.
Date Formats and Column Uniformity
Date columns must:
- use a single format across all rows
- represent valid calendar dates
- not mix text and date types
Spreadsheet tools often convert dates silently based on locale settings.
If dates appear inconsistent:
- stop processing
- restore the original file if possible
- re export from the provider instead of fixing manually
Manual date fixes should be avoided whenever possible.
Common Preparation Scenarios
The following cases are legitimate reasons to prepare a file:
- removing informational rows before the header
- removing summary or total rows at the end of the file
- exporting a single relevant tab from a multi tab XLSX
- converting a selected tab into a CSV for clean import
When exporting a single tab from XLSX:
- always export as CSV
- avoid copy paste between files
- verify encoding and delimiters
File Sanity Check Before Import
Before importing a prepared file, always verify:
- the header is on row 1
- column names are unique
- numeric columns contain only numbers
- date columns are consistent
- no unexpected extra rows exist
- the file encoding is unchanged
If anything looks suspicious, do not proceed with import.
Updated about 3 hours ago
