This article provides definitions and examples that explain the export field options in Payhawk and shows how you can structure and format data in the export template. For what each option shows in the exported file, see the list of export field options and their definitions.
Running balance
Running balance is a balance kept for each Payhawk currency account. It starts from the currency account’s start balance for the export period. In expense, line item and payment rows, it takes off the amount of each row, the current row included: the Payments wallet amount with fees for expenses and the Payment wallet amount for payments. In deposit rows, it adds the amount of each deposit. You can use it in every row type except the header and footer.
For example, if the initial balance is EUR 100, the first payment is EUR 10, and the second payment is EUR 15, then the running balance will show EUR 90 on row 1 and EUR 75 on row 2.
Split
Split represents the delimiter used to separate a single value within a specific cell. This function allows data to be broken down into distinct components for easier processing and analysis.
For example, if the document numbers are INV-1001, INV-1002, INV-1003, you can use a comma as the split character among them. This will allow you to extract a specific value such as the last INV-1003 item.

Leading/Trailing characters
Leading/Trailing characters are the characters added at the beginning or end of a value to ensure it meets the required maximum character length when the Max. characters value is more than the actual value length. You can also specify the type of character that will be used as a leading or trailing character.
For example, if the value for a Date of payment is 05.04.23, you've defined 10 as Max. characters and A as Character:
The result in the cell will be AA05.04.23, if you've selected the Leading characters option.
The result in the cell will be 05.04.23AA, if you've selected the Trailing characters option.

The Leading/Trailing characters option also specifies in what way the system will be cutting the text short when the Max. characters value is less than the actual value length. When you select Trailing characters, it will cut off the end of the text, and if you select Leading characters, it will cut off the beginning of the text.
For example, if the value for a Date of payment is 05.04.23 and you've defined 5 as Max. characters:
The result in the cell will be 04.23, if you've selected the Leading characters option.
The result in the cell will be 05.04, if you've selected the Trailing characters option.
Aggregate
Aggregate adds up an amount that you choose in Aggregate by over the rows of the export and shows the total. In expense exports you can also add up mileage by selecting the Mileage > Total mileage distance option. Expenses without a mileage will be skipped and if the export has both kilometers and miles, the cell will stay empty. You can use it only in the header and footer rows, and only when aggregate functions are turned on for your account.
Account balance
Account balance shows the balance of one Payhawk currency account that you choose. The export needs a date range for it to work. You can show one of the following balances:
Start balance - The total balance of the currency account, available and reserved, at the start of the export period.
End balance - The total balance of the currency account at the end of the export period.
Available balance - The end balance minus the reserved balance.
Reserved balance - The amount on hold at the end of the export period.
Calculated fields
Calculated fields generate values based on predefined rules. The export template includes the following fields of numerical references and date formatting options.
Line item row number
Line item row number assigns a sequential row number within each expense. Its behavior is similar to Excel row numbering but is specific to the expense.
For example, if you have an expense with 5 rows and another one with 3 rows, the line item row numbers for the first expense will be 1, 2, 3, 4, 5 and 1, 2, 3 for the second one.
Row number
Row number is a running row number: 1, 2, 3, and so on. Rows that come from the same expense line, the same payment or the same deposit share one number. The numbering starts again at 1 in each section of the export.
Journal entry number
Journal entry number is a running number per expense. Every row of the same expense gets the same number, and the number goes up by 1 with each new expense. Payment and deposit rows don't change the number. The numbering starts again at 1 in each section of the export.
For example, if the export has 3 expenses with 2 rows each, the journal entry numbers will be 1, 1, 2, 2, 3, 3.
Transform amount
Transform amount allows you to define the way amounts will be displayed in the export template.
To modify an amount:
Click on the desired value, for example, Expense total amount (Base Currency).
Select one of the following Transform amount optional settings:
None - Keeps the amount as it appears in the system. For example, EUR -100 (minus 100) will be displayed as EUR -100 without modifications.
Amount absolute value - Converts the amount to its absolute value by removing negative signs. For example, EUR -100 will be displayed as EUR 100.
Amount in inverse sign - Reverses the sign of the amount, converting positive values to negative and negative values to positive. For example, EUR 100 will be displayed as EUR -100.
Click on Save changes.

Quantity and unit price
Quantity and Unit price are line item values that you can add as columns in a custom export template. Quantity shows how many units were bought, and Unit price shows the price of one unit before tax.
For more information, see the article on recording quantity and unit price on expenses.

Attachment Url
By default, Attachment Url provides a comma-separated list of all files uploaded for a specific expense. To display a single Url per cell, click on the Attachment Url value and define the Index in list setting.
The links open only for people who are logged in to Payhawk and have access to the Payhawk account. If you send the export to an external accountant or auditor, invite them to Payhawk with the Auditor role. For more information, see the article on Payhawk roles.
The Index in list setting allows you to specify that, for example, Cell A displays the first file, Cell B displays the second file, and so on, similarly to how the Split function works.
