- Home
- Guides
- Import a broker CSV
- Hargreaves Lansdown CSV export
How to export your Hargreaves Lansdown transactions to a CSV
Last updated . Written by Divisio Capital. Broker help pages checked on 15 November 2026.
Each Hargreaves Lansdown account has a Transaction history tab on the HL website, and that history saved as a CSV is the file to import. Divisio reads it as it comes, with its buys, sales, payments in, dividends, interest and fees, and it also reads HL's holdings list and account summary.
This page gives the steps HL's own help confirms, says what is in each file and what Divisio does with it, and lists the problems that come up. You can look round the demo first, with two example portfolios and no sign-up.
Export the file from Hargreaves Lansdown
- Log in on the HL website: select Log in at the top right (HL help, How do I log in?).
- Choose the account (for example your Stocks and Shares ISA, SIPP or Fund and Share Account) and open its Transaction history tab. HL's help names the Transaction History tab for a SIPP, on its SIPP tax relief page, and refers to your Transaction History in general: contract notes for completed trades are there (How to buy funds).
- Save that history to your computer as a CSV file.
All three pages were read on 15 November 2026. HL's public help pages did not describe how to download the history on that day, so step 3 names no button. If you cannot find a download on the page, ask HL for the account's transaction history as a CSV. If the file comes as an Excel workbook, open it and save it as CSV: Divisio's import takes CSV files.
What the file contains
Divisio finds the file by its headings, and reads three kinds of HL file.
The transaction history
Headings: Trade date, Settle date, Reference, Description, Unit cost (p), Quantity and Value (£). A few lines above them name the account and the day it was printed; Divisio skips those.
| Column | What Divisio does with it |
|---|---|
| Reference | A reference starting with B is a buy and one starting with S is a sale. Other rows (a card payment in, a dividend, interest, a fee) are cash lines. |
| Description | The share or fund's name. The file has no ticker, so Divisio searches for the listing by name and the preview asks you to check it. |
| Unit cost (p) | The price per share, in pence when the heading says (p), turned into pounds. |
| Quantity | The number of shares or units. |
| Value (£) | What the trade cost or brought in. Any difference from the shares at their price (stamp duty, a dealing charge) is kept as the trade's costs. For a cash line it is the amount, with money out shown below zero. |
The holdings list
Headings: Code, Stock, Units held, and a Cost column. Each row is one holding at its average cost. The file gives no purchase date, so the preview uses today's date and asks you to change it if you know it.
The account summary
Headings: Stock, Units held, Price (pence), Value, Cost and Weighted Avg. Purchase Date. It is a valuation, not a list of trades: each row is a holding at its average cost, and the Total cash line can be set as the portfolio's cash. Where the purchase date is blank, the preview asks you to choose one. Your name and client number at the top of the file are not kept. Because it lists no sales, it cannot show past gains; the transaction history can.
Import it into Divisio
- Sign in and open Portfolio. Use one portfolio for each HL account, and set its account type (general account, Stocks and Shares ISA, SIPP, Lifetime ISA or Junior ISA) from the portfolio menu, so an ISA's sales stay out of the capital gains figures.
- Press Import CSV, then Choose CSV files and pick the file. Up to 12 files can be chosen together, such as one a year.
- Divisio reads the file and shows a preview: each holding, the listing it found by name, and each trade's price checked against that day's low and high (a fund priced once a day against its prices on the days around it). Nothing is saved yet.
- Check anything the preview marks, then press Import.
The file's text goes to Divisio's server to be read. What is saved is the holdings, sales and cash lines you import, not the file itself.
Sales, dividends, cash and currencies
- Sales. Each sale is matched with the shares bought before it, and sells them whole or in part. The capital gains tax page explains how a sale is then matched in HMRC's order for tax.
- Dividends, payments in and fees. With Bring the file's cash into this portfolio ticked, as it is when the file has cash lines, each one becomes an entry in the portfolio's cash on its own date. Each buy is paid from that cash and each sale adds what it brought in. Untick the box and nothing is added to or taken from the portfolio's cash.
- Currencies. HL's history gives prices in pence and values in pounds, and Divisio turns pence into pounds before it uses them. Your totals are shown in pounds, or in dollars or euros if you prefer.
Common problems
- "Found by its name". HL's files name each holding without a ticker, so the preview says which listing it found and asks you to check it. If the file's price agrees with that listing's, it says so.
- "No listing found". Choose the right one from the list the preview offers, or leave that holding out.
- A sale of more shares than the file buys. When the history starts after you bought, the sale sells the shares the portfolio already holds; if it holds none, the preview says so and leaves the extra out. Import the earlier history with it, or add those shares by hand first.
- "No buys or sells were found in the file". That file holds only cash lines, such as a cash statement. Choose the transaction history instead.
- "Already in this portfolio". The preview marks each buy and sale that is in this portfolio already, but it does not leave them out by itself. Leave those stocks out, and untick the cash box if the file's cash came in before, or they are counted twice.
- A long history. One file can have up to 20,000 rows and the import takes up to 900 KB at a time. Export a shorter period and import each part. Files chosen together, up to 12 and 900 KB in all, are read as one, and a trade in two of them of overlapping periods is read once. A part imported later is not checked against the earlier ones that way: the preview marks each buy and sale already in this portfolio (“Already in this portfolio”), so leave those out, and untick the cash box if that cash came in before.
Divisio Capital is not affiliated with or endorsed by Hargreaves Lansdown. The steps above come from HL's public help pages and can change; HL's help has the current version.
Questions people ask
Which Hargreaves Lansdown file should I import?
The transaction history, saved as CSV. It lists each buy and sale with its date, so Divisio can work out your capital gains. The holdings list and the account summary give what you hold now, at its average cost.
Why does the preview ask me to check each listing?
HL's files name each holding but give no ticker, so Divisio finds the listing by its name and asks you to confirm it before anything is saved.
Does Divisio connect to my HL account?
No. It reads the file you download. It does not log in to HL, hold your money or place trades.
I have an ISA and a SIPP with HL. What do I do?
Make a portfolio for each, set one as a Stocks and Shares ISA and the other as a SIPP, and import each account's file into its own portfolio.
Is this financial advice?
No. This page explains how to move your own records into a tracker. It never says what to buy or sell.
Other brokers: see import a broker's history into a portfolio tracker, or track shares from several brokers in one place. To try it with your own file, create an account. It’s free while in beta.
See your own shares this way
Add what you own, from any broker, in a couple of minutes. Every feature is free during the beta, and no card is asked for. Or look round the demo first: two example portfolios, no sign-up.
For informational purposes only, not financial or tax advice. Tax rules depend on your own circumstances and can change; GOV.UK has the rules in full. Prices from Yahoo Finance, which can be delayed, usually by 15 minutes and on some exchanges by more.