Convert an XML file to Excel, totals and all
An iPhone Health export turned into daily step totals and every weight reading.
A real run on 14 November 2026, on a Linux computer, using Claude Code with Opus, on a Claude plan. The waiting is sped up; it took 2 min 13 s in real time.
The short answer.
Excel for Windows reads XML through Data, Get Data, From File, From XML; you then filter and group the records yourself. For exports like the iPhone Health one, the catch is that the XML holds thousands of small records, so a day's steps are spread over many rows and need adding up. Stella (stella.sh) unzips the export, adds them up per day and lays the result out in a spreadsheet.
Stella does this on Windows, Mac and Linux.
What happened.
A two-tab spreadsheet in about 2 minutes. Checked afterwards against an answer key written before the run: total steps exactly right for all 92 days (every record of each day added up), and all 15 weight readings with their dates.
The health data is fictitious, generated for this run in the Health export's real structure (zip, export.xml, record types and dates). The work is sped up 7×.
How Stella does it.
- Finds export.zip in Downloads and reads the export.xml inside, which Health writes as one long list of records grouped by type, not by date
- Picks out the step-count records from among thousands of heart-rate and walking-distance ones, and checks whether a phone and a watch both counted steps (here only the iPhone did, so nothing needed removing)
- Adds every step record of each day into one daily total, for all 92 days from 1 July to 30 September
- Lists every weight reading with its date, in pounds as recorded
- Saves “Apple Health - Steps and Weight.xlsx” next to the zip, with a tab for steps and one for weight, and mentions the highest and lowest days
The prompt.
I exported my health data from my iPhone, it's the zip in my Downloads, and inside is an XML file I can't open. Make me a spreadsheet with my total steps for each day and all my weight readings.
This is the exact prompt from the recording. If your files are somewhere else, say where.
Do it yourself.
Get the export onto your computer
On the iPhone: Health app, your picture, Export All Health Data. Send the zip to your computer (AirDrop, Files, email to yourself if it's small) and unzip it. The data is in apple_health_export/export.xml.
Windows: Excel's XML import
Data, Get Data, From File, From XML, and pick export.xml. Choose the Record table and Transform Data. Filter the type column to HKQuantityTypeIdentifierStepCount.
Total each day
Add a column with the first 10 characters of startDate (the date), change the value column to a number, then Group By that date with Sum of value. Close & Load. Repeat with BodyMass for weight, without grouping.
On a Mac
Numbers can't read the export, and Excel for Mac's XML support is limited. The Power Query steps above work in recent Microsoft 365 builds of Excel for Mac (Data, Get Data); otherwise use a Windows PC or a script.
Where it stops.
- When an iPhone and a watch both count steps, the export holds both and a plain sum counts the overlap twice; the Health app hides that. Stella checks for two step sources and says what it did. In this run there was only one.
- Real exports can be several GB after years of data. Stella reads them in a stream, but it takes a few minutes.
- Stella looks at the structure and a sample of the records; the totals are worked out on your computer, so your full health history isn't sent to the AI model.
- Recorded on Linux with Python's built-in XML reader. A Mac or Windows PC works the same way.
Questions.
How do I open an XML file?
Any text editor or browser shows it, but as raw tags. To get a table, use Excel's Get Data, From XML on Windows, or ask Stella for the columns you want.
Can I do this for other XML files, not just Health?
Yes. Bank, accounting and shop exports often come as XML; the steps are the same: pick the repeating record, choose columns, and total where needed. For JSON exports, see convert JSON to Excel.
Can it show weekly or monthly averages too?
Yes, ask for them. Or use summarize a spreadsheet by category on the daily totals.
Is Stella free for this?
Yes. Free with the ChatGPT or Claude plan you already have. Sign in with your ChatGPT plan, or use your Claude plan through Claude Code, and this task costs nothing extra. New accounts also get a small free trial of Stella’s own models.
Can I control what Stella changes on my computer?
Yes. Stella works on Windows, Mac and Linux with your own files and shows each step in the chat, so you can watch it and stop it at any point. Tell it what it may not do, as the prompts on these pages do (“don't delete anything without asking”). In the Downloads recording it deleted nothing until it was told to go ahead. It also refuses commands that would wipe a whole disk, your home folder or system folders.
Checked against these sources on 14 November 2026.