# Create templates for telematic VAT statements in XML file format
In order to submit VAT statements electronically, you must create templates to generate the required files. You can submit files in text format and in XML format. This procedure describes how to create templates for XML files.
See Spanish Tax Agency<https://go.microsoft.com/fwlink/?LinkID=238181> website.
## Create a template for VAT statements in XML file format
1. Select Search (Alt+Q) in the upper-right corner, enter VAT Statement, and then choose the appropriate link.
1. Select the required VAT statement, and then choose the Design XML file action.
1. On the XML Transference Format page, fill in the fields as described in the following table.
> IMPORTANT
> The values for the fields are determined by the tax authorities.
> Learn more at the Spanish Tax Agency<https://go.microsoft.com/fwlink/?LinkID=238181> website.
Field|Description
VAT Stmt. Name|Specify the VAT statement name that this template is for.
No.|Specify the field number in the XML file.
Line Type|Specify whether the VAT statement line type is an XML element or an XML attribute.
Indentation Level|Specify the indentation level for the label. This level is used to format the XML file.
Parent Line No.|Specify the line number of the parent line that the current line is indented under.
Value Type|Specify the subtype of the field.<br><br/> The subtype specifies if the line must show only the integer part of an amount, the decimal part, or the full amount.
Description|Specify the text that you want to appear on the label.
Value|Specify the value for the label.
Box|Specify the box number from which to retrieve the data.
Ask|Specifies if the Value field can be changed before you create the XML file.
Exists Amount|Select to omit the XML node when both Value and Box are blank.
1. Repeat the previous step for additional lines in the VAT statement.
1. Choose the OK button.
This creates the template. Now, you can create a file that you can then submit to the tax authorities.
> NOTE
> Use either Value or Box on a line, not both. If you specify Box, select a nonblank Value Type. An attribute requires either a value or a box.
## Related information
 how-to-export-vat-statements-in-xml-format
 how-to-create-templates-for-telematic-vat-statements-in-text-file-format
Find free e-learning modules for Business Central here<https://learn.microsoft.com/training/dynamics365/business-central>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/localfunctionality/spain/how-to-create-templates-for-telematic-vat-statements-in-xml-file-format, MicrosoftDocs/dynamics365smb-docs at 46907ac (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/localfunctionality/spain/how-to-create-templates-for-telematic-vat-statements-in-xml-file-format/
