# Export to Accounting Software

Frihet exports billing data in 5 formats that major accounting programs can import directly. This allows managers and tax advisors to work with their usual tools without manual data entry.

## Available Formats

| Format | Target Software | Delimiter | Encoding | Date Format |
|---------|-----------------|-------------|--------------|-------------------|
| ContaPlus xDiario.txt | Sage 50, ContaSol, A3 | Fixed-width (129 characters) | latin-1 | YYYYMMDD |
| DATEV EXTF | German accounting firms (~90% of the market) | `;` (semicolon) | latin-1 / CP1252 | DDMM |
| Xero CSV | Xero (global) | `,` (comma) | UTF-8 | DD/MM/YYYY |
| QuickBooks CSV | QuickBooks (global) | `,` (comma) | UTF-8 | MM/DD/YYYY |
| Generic CSV | Universal | `,` (comma) | UTF-8 with BOM | ISO 8601 |

## ContaPlus (xDiario.txt)

The ContaPlus xDiario format is the historical accounting standard in Spain. It generates a text file with fixed-width records of 129 characters per line.

### Record Structure

Each invoice generates between 2 and 3 lines of accounting entry:

| Position | Length | Field | Example |
|----------|----------|-------|---------|
| 1-2 | 2 | Entry Type | `A1` |
| 3-10 | 8 | Date | `20260215` |
| 11-22 | 12 | Accounting Account | `430001000000` |
| 23-34 | 12 | Contra Account | `700000000000` |
| 35-49 | 15 | Amount | `000000121000.00` |
| 50 | 1 | D/H (Debit/Credit) | `D` |
| 51-90 | 40 | Concept | `Inv. FRI-2026-0001` |

### Default Accounting Accounts

| Account | Concept |
|--------|----------|
| 430XXX | Clients (XXX = client code) |
| 477000 | Public Treasury, Output VAT |
| 700000 | Sales of goods / provision of services |
| 472000 | Public Treasury, Input VAT |
| 600000 | Purchases / expenses |

### Import into Sage 50

1. Open Sage 50 and go to **Accounting** > **Journal** > **Import**
2. Select the **xDiario ContaPlus** format
3. Load the `.txt` file exported from Frihet
4. Review the entries and confirm the import

## DATEV EXTF

The DATEV EXTF format is the de facto standard in German accounting firms and is also used in Austria and Switzerland. Frihet generates files compatible with DATEV Unternehmen Online and similar.

### EXTF Header

The first line of the file contains the batch metadata:

```
EXTF;700;21;Buchungsstapel;12;...
```

### Main Fields

| Field | Description |
|-------|-------------|
| Umsatz (Soll/Haben) | Debit or Credit Amount |
| Gegenkonto | Contra Account |
| BU-Schlüssel | Tax code (8 = 19%, 9 = 7%) |
| Belegdatum | Document date (DDMM) |
| Buchungstext | Entry text |
| Belegfeld 1 | Invoice number |

### Encoding

DATEV requires latin-1 (CP1252) encoding. Frihet automatically converts special characters (accents, ñ) when exporting.

## Xero CSV

Xero is the most used accounting software in Anglo-Saxon markets. The Xero CSV contains 43 columns that cover all fields of a sales invoice.

### Main Fields

| Field | Description |
|-------|-------------|
| *ContactName | Client name (required) |
| *InvoiceNumber | Invoice number |
| *InvoiceDate | Issue date (DD/MM/YYYY) |
| *DueDate | Due date |
| *UnitAmount | Unit price |
| *Quantity | Quantity |
| *AccountCode | Accounting account code |
| TaxType | Tax type (OUTPUT, INPUT, NONE) |
| Description | Description of the item |
| Currency | ISO currency code (EUR, USD, GBP...) |

### Import into Xero

1. In Xero, go to **Business** > **Invoices** > **Import**
2. Select **CSV** as the format
3. Load the file exported from Frihet
4. Map the columns (Frihet's CSV uses the exact Xero names)
5. Confirm the import

## QuickBooks CSV

The QuickBooks CSV format is compatible with QuickBooks Online and QuickBooks Desktop.

### CSV Fields

| Field | Description |
|-------|-------------|
| InvoiceNo | Invoice number |
| Customer | Client name |
| InvoiceDate | Issue date (MM/DD/YYYY) |
| DueDate | Due date |
| Item | Description of the item |
| Quantity | Quantity |
| Rate | Unit price |
| Amount | Line total amount |
| TaxCode | Tax code |
| TaxAmount | Tax amount |
| Memo | Additional notes |

:::info Date Format
QuickBooks uses the MM/DD/YYYY (month/day/year) format. Frihet automatically converts dates when exporting.
:::

## Generic CSV

The generic CSV format is the universal option when no other format fits the target software. It includes all available fields with the broadest possible compatibility.

### Features

- **Encoding**: UTF-8 with BOM (compatible with Excel in all languages)
- **Delimiter**: comma
- **Dates**: ISO 8601 format (`YYYY-MM-DD`)
- **Amounts**: decimal notation with a dot (`1234.56`)

### Included Fields

The generic CSV exports all invoice fields: number, date, client (name, tax ID, address), items (description, quantity, price, tax), totals, payment status, and VeriFactu metadata.

## How to Export

### Individual Export

1. Go to **Billing** > **Invoices**
2. Open the invoice you want to export
3. In the actions menu, select **Export** > desired format
4. The file is downloaded

### Export by Period (Accounting Firm Dashboard)

If you have access to the Accounting Firm Dashboard:

1. Go to **Accounting Firm Dashboard** > **Export** tab
2. Select the export **format**
3. Select the **period** (month, quarter, or custom range)
4. If you manage multiple clients, select the **client**
5. Click **Download**

The file contains all invoices for the selected period in the chosen format.

## Batch Modelo 303

The Accounting Firm Dashboard allows generating the draft Modelo 303 for multiple clients simultaneously:

1. Go to **Accounting Firm Dashboard** > **Batch** tab
2. Select the **quarter** and **year**
3. Select the clients for whom you want to generate the model
4. Click **Generate Batch**
5. A ZIP file containing a draft Modelo 303 for each selected client is downloaded

:::tip
Batch export saves significant time at quarterly closing when managing multiple clients from the same accounting firm workspace.
:::

## Notes on Encoding

ContaPlus and DATEV formats require **latin-1** (ISO 8859-1 / CP1252) encoding. Frihet performs the conversion automatically upon export:

- Compatible characters are converted directly
- Characters without a latin-1 equivalent are transliterated (e.g., Asian characters are replaced by their closest ASCII representation)

Xero, QuickBooks, and generic CSV formats use **UTF-8** and have no character restrictions.

---

**Related:** [Ledger Book](/cumplimiento/libro-registro) | [Tax Forms](/cumplimiento/modelos-fiscales) | [All Integrations](https://www.frihet.io/es/integrations)
