Field notes
How to read an Apple Health export without writing a script
The export finishes, then nothing opens it. A plain walkthrough of the ZIP, why export.xml resists spreadsheets, and the no-code routes that work.
Apple Health will hand you a complete copy of your data, but not in a form you can read. The copy is a ZIP file. The main file inside it is one large XML document that a spreadsheet won't open directly. You can still read it without writing any code. This guide shows how, with a focus on clean rows and a note of what you did, for anyone who wants Health data next to a protocol log.
Start the export on your iPhone#
Apple's guide says you can export all of your health and fitness data from Health in XML format. On an iPhone the path is short. Open Health, tap Summary, then tap your picture or initials at the top right. Tap Export All Health Data, then choose how you want to share the file. Apple describes the steps in its Share your data in Health guide.
If you have years of history, expect the export to take a few minutes, according to a walkthrough of the process. Let it finish before you switch apps. When it is done you will pick a place to send the result, such as Files, AirDrop or an email draft to yourself. Sending it to a computer is easiest, because the next steps are simpler on a larger screen.
What is inside the ZIP#
The result is a ZIP file. According to the same walkthrough, it holds two things: export.xml, and a folder with your workout GPS routes.
The export.xml file is the one that matters for a log. It holds every stored record, including data written by third-party apps that have permission to write to Health. That means entries from a scale, a nutrition app or a tracker all end up in one place, each tagged with where it came from. For a closer look at the structure, see what the export file actually contains.
A practical point: unzip the archive before you do anything else. Leave the original ZIP untouched in a folder of its own, and work on a copy. That way a mistake in conversion never costs you the source.
Why the file will not open in a spreadsheet#
The same walkthrough notes that export.xml cannot be opened directly in Excel or Google Sheets, so some kind of conversion is needed. The reason is the shape of the data. A spreadsheet expects rows and columns. The export is a long stream of records, one after another, each with its own attributes. Different kinds of data sit side by side in the same file, so there is no single table to show.
Size makes it worse. The file grows with every year of data you have, and a text editor may freeze on a large one. If the app hangs when you open it, blame the file, not your device.
This is also why apps that read from Health through HealthKit return what they do. If you want the background on that, what an app gets back from HealthKit explains the limits.
No-code routes#
You have three practical ways to get readable rows without writing a script. All three come from the same walkthrough.
Conversion apps#
Apps such as QS Access and Health Auto Export run on the iPhone and produce tables with ISO timestamps. You choose the data types you want, and the app gives you a file a spreadsheet can open. This is the closest thing to a one-step answer. Check what each app asks permission to read before you grant it, and note that the apps differ in what they include.
Shortcuts#
iOS Shortcuts can pull specific Health samples without using the XML file at all. This suits a narrow need, such as bringing one measurement into a note or a sheet on a schedule. It is less suited to a full history, because you are building the extraction yourself, one sample type at a time.
What to check in any converted table#
Whichever route you use, spot check the result before you trust it. Pick three or four rows you remember: a day you weighed yourself, a workout, a night you slept badly. Confirm that the date, the time and the unit match what you recall. Timestamps are the usual trouble, so look at them first. If a row is off by a few hours, check how the tool handles time zones before you read anything into the pattern.
Do not read meaning into the numbers at this stage. The goal is only to confirm that the table is a faithful copy.
Where a command-line converter fits#
There is also a scripted route, and it helps to know what it looks like even if you skip it. The open-source tool ahcd is a command-line utility that converts export.xml into CSV files. You install it with npm i -g ahcd and run ahcd export.xml. It writes one CSV per health data type, such as StepCount, BodyMass, SleepAnalysis and HeartRate, and prints a record count for each file. Two options help: -t limits the output to one data type, and -d sets the output directory.
That route needs a terminal and Node.js, which is why this guide stays with the no-code options. The project page does not say what columns each CSV contains, so open one file and read the header row before you rely on it.
Keep a note of what you exported#
A converted table is only useful later if you know where it came from. Right after you export, write down four things next to the file:
| Field | Example | | --- | --- | | Export date | The day you tapped Export All Health Data | | Tool used | Conversion app, Shortcut, or command-line tool | | Data types kept | For example body weight and sleep | | Rows spot checked | Which ones, and whether they matched |
This is the same habit that makes any log auditable. When you compare two exports months apart, you will know which one is newer and how each was made. If you keep a protocol log in OptimizedTracker, a short line in your notes about the export date does the same job. For the wider habit of keeping a copy that survives a lost phone, see backing up and exporting your log.
The short version#
The export is a complete copy of your Health data, but it is not a readable one. Start it from Summary and your picture, unzip a copy, and convert export.xml with a conversion app or a Shortcut. Check a few rows against what you remember, then write down the date and the tool you used. Use the converted table as a record to compare against your own log, not as an answer. Individual data is noisy, and a single reading is not a trend.
Share
Related
01
