FitMigrate

Apple Health Export to CSV for Excel or Google Sheets

By Josep Mampel Marques, updated

To get Apple Health data into Excel, Google Sheets or Numbers, first export it from the Health app as export.zip, then convert the export.xml inside it into one CSV file per metric. FitMigrate does that conversion in your browser: open the zip, tick the metrics you want, such as steps, heart rate or weight, and download them as CSV files with start date, end date, value, unit and source. Each CSV then opens like any other spreadsheet file.

Why you need to convert first

Apple exports Health data as XML, not as a table. In a 2023 Apple Community thread a user could not get export.xml into Excel at all, and the replies point out that XML is a way of structuring data that does not map straight onto a sheet. The usual answer is to convert it with an app or a script. With years of Apple Watch data, export.xml can also be close to a gigabyte, which is more than most spreadsheet apps will load.

Step 1: get your export.zip

On your iPhone, open Health, tap Summary, tap your picture or initials, then tap Export All Health Data and save the file to Files or send it to your computer. The full walkthrough is in how to export all Apple Health data.

Step 2: convert it to CSV

  1. Open FitMigrate and choose Choose your Apple Health export.zip. You do not need to unzip it.
  2. Wait for the scan. Under Metrics to CSV you see every metric in your export, such as Step Count, Heart Rate, Body Mass or Sleep Analysis, with its number of records.
  3. Tick the metrics you want, or use Select all.
  4. Click Download selected as CSV. One metric is saved as a single file named after it, for example StepCount.csv. Several metrics are saved together as apple-health-csv.zip.

Every file has the same five columns:

FitMigrate copies the values as they are. It does not add totals, averages or any interpretation of your health data.

Step 3: open it in your spreadsheet

Microsoft Excel

  1. Open a blank workbook and select the first cell.
  2. On the Data tab, in the Get & Transform Data group, click From Text/CSV.
  3. Pick the CSV file and click Import, then Load.

Importing this way lets you check how each column is read. Microsoft notes that if a column does not convert as you want, you can convert numbers or dates stored as text after import. A worksheet holds at most 1,048,576 rows, so a heart rate file from years of Apple Watch use may not fit on one sheet.

Google Sheets

  1. Open a spreadsheet in Google Sheets on your computer.
  2. Click File, then Import, and upload the CSV.
  3. Choose an import option, such as Insert new sheets or Create new spreadsheet.

Google Drive allows up to 20 million cells in a spreadsheet. A five-column CSV fits comfortably unless it has millions of rows. Note that importing into Sheets uploads that file to your Google account.

Apple Numbers

On a Mac, choose File, then Open, and select the CSV, or drag it onto the Numbers icon. If the columns look wrong, Apple's guide says to open the Format sidebar, click the Table tab and use Adjust Import Settings to choose the separator. Numbers on iPhone and iPad can import delimited text files too.

Big metrics: what to expect

Some metrics are recorded many times a day by Apple Watch. Heart rate, active energy and walking distance often have far more rows than steps per day or weight. If a file is too big for your spreadsheet, export only the metrics you need, or work with the CSV in a tool built for large data. For tracking a few numbers over time, see weight, steps or sleep in a spreadsheet.

Alternatives

If you want regular CSV exports straight from the phone without the full export, iPhone apps that read Apple Health directly can do it. HealthFit, for example, lists export to CSV and Google Sheets among its formats. FitMigrate is free, needs no install and works on the full export in one go, which suits a one-off conversion of your whole history.

Two metrics with their own quirks have their own guides: heart rate, which gets very large, and sleep, which uses labels instead of numbers.

FAQ

Can Excel open export.xml directly?

Not in a useful way. The data sits in attributes of millions of XML lines and the file is often hundreds of megabytes. Converting it to one CSV per metric first is far easier.

My heart rate CSV has more rows than Excel allows. What now?

Excel stops at 1,048,576 rows per worksheet. Export a shorter metric instead, or work with that file in a tool built for large data, such as a database or a Python script.

Are the CSV files sent anywhere?

No. FitMigrate builds them inside your browser tab and saves them straight to your device.

Sources