> For the complete documentation index, see [llms.txt](https://docs.os.uk/os-downloads/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.os.uk/os-downloads/products/areas-and-zones-portfolio/code-point/code-point-getting-started-guide/csv-file-processing.md).

# CSV file processing

As the Code-Point data is supplied in separate .csv files by two-digit grid references, they will require some processing in order to proceed.

The Great Britain .csv files should be combined with the CSV header file, and the Northern Ireland .csv file should be combined with the CSV header file.

See CSV header file for more details and download information.

1. Before processing the data, create the following folders:
   * Northern Ireland – move the BT.csv file into this folder.
   * Great Britain – contains all remaining .csv files for Great Britain (120 in total).
2. Add the CSV header file (code-point-column-headers.csv available on the [Code-Point Downloads page](/os-downloads/products/areas-and-zones-portfolio/code-point/code-point-downloads.md)) into both folders and precede the name with: aa\_

<figure><img src="/files/WpKaXSaTV8qPT9gJfJzp" alt="Screen listing CSV header file and Great Britain CSV files."><figcaption><p>CSV header file and Great Britain .csv files</p></figcaption></figure>

<figure><img src="/files/L0oqzO9XrUvnY0rz4rgs" alt="Screen listing CSV header file and Northern Ireland CSV file."><figcaption><p>CSV header file and Northern Ireland .csv file</p></figcaption></figure>

## Combining multiple CSV files <a href="#id-4.1-combining-multiple-csv-files" id="id-4.1-combining-multiple-csv-files"></a>

The following is an example of one way to combine all the individual .csv files into a single file by using a .bat batch file.

{% hint style="info" %}
The .csv file that is created comes to approximately 150 MB, and 1.7 million records. If this is opened in Microsoft Excel, only the first million records can be seen as the software cannot display more than this number of records.
{% endhint %}

To use the batch function:

1. Copy the following text and paste it into a new Notepad document: \*.csv outputfile.csv
2. Save the Notepad document with the file extension .bat (for example, combine\_csv.bat) in the Great Britain folder containing the 120 Great Britain .csv files.
3. Close the .bat file and navigate to the Great Britain folder, where it was saved. Double-click on the .bat file and an MS-DOS window will appear. Once the process is complete, the MS-DOS screen will close automatically.
4. A new CSV file with the name *outputfile.csv* has now been created within the Great Britain folder.
5. Repeat this process with the Northern Ireland data.

You will now have two output files ready for uploading into geospatial software (such as QGIS).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.os.uk/os-downloads/products/areas-and-zones-portfolio/code-point/code-point-getting-started-guide/csv-file-processing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
