You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

💡 Did you know?

⏺ If you can't accept iCloud Terms and Conditions... Learn more >

⏺ If you don't see your iCloud notes in the Notes app... Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Exporting Health app data

I would like to use the Health app to record my daily blood glucose test results, but there doesn't seem to be any way to generate a report on the results for my doctor or export the data to a CSV or any other type of file. My doctor's practice is not set up yet to receive electronic results, so I still need to give him a hard-copy report. If anyone has figured this out, please let me know.

Posted on Oct 6, 2014 9:51 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 8, 2014 12:55 PM

Disclaimer: I have my language set to Swedish, so I may be off on some UI labels.


In the Health app, go to Health Data (the binder with the heart on it)

Click the box with the outwards arrow (top right)

It will give you the option to export the data by emailing a .zip file.

30 replies

Nov 3, 2014 1:25 PM in response to rugburn

If you have not found a way to format the XML data yet here is at least one way:


1) Open a blank Excel Workbook.

2) For Excel 2007 or more recent, choose the Data tab on the top.

3) On the left side there is a 'Get External Data' block of choices, click the dropdown arrow on 'From Other Sources'.

4) Click on the third choice 'From XML Data Import'.

5) Find your downloaded XML file and click 'Open'.

6) Excel will likely display a message that the source does not refer to a schema. Choose 'OK'.

7) If you click 'OK' with the default choice 'XML table in existing worksheet', data will be displayed in Excel table format, which will let you sort and filter data. The other choices only displays the data in columns.


You will likely need to create an additional column for dates, as the 'startDate' and 'endDate' times are in a format that Excel won't recognize, if you need any date to your data anyway. If you need a conversion formula you can reply to this message stating as much. You probably already found that the export zip file shows detailed logs for every day on an hourly basis for the last week only, prior records at least in the export are summarized by day.

Nov 17, 2014 8:11 AM in response to ludlowboy

Assuming that your startDate and endDate is in a column, do the following:


For a separate date and time column enter the following formula in a new column:


=DATE(LEFT({Cell with Data},4),MID({Cell with Data},5,2),MID({Cell with Data},7,2))

=TIME(MID({Cell with Data},9,2),MID({Cell with Data},11,2),)


You can fill (or copy paste) the formula down to encompass the full range of values you would like to convert.


You can also combine date and time in a single column by entering this formula:


=DATE(LEFT({Cell with Data},4),MID({Cell with Data},5,2),MID({Cell with Data},7,2))+TIME(MID({Cell with Data},9,2),MID({Cell with Data},11,2),)


Hope that works for you, and remember it appears that exported health data only shows daily summaries for any data older than 1 week, so the time stamp on that older data will reflect that.

Dec 30, 2014 12:01 PM in response to Stanley Horwitz

I had the same question. I couldn't figure out how to import xml data to Numbers or Excel for Mac 2011, but I found a way in LibreOffice using their Spreadsheet. I saved the xml file to the desktop, then opened a new spreadsheet in LibreOffice. Under the Data menu I selected XML Source. Click on the folder icon under "Source File" and find your xml file. In the window labeled "Map to Document", scroll down to "Record" and highlight it. This should highlight all the data labels related to your records (type, source, unit, value, etc.). In the "Mapped Cell" window, type "A1", then click Import. At this point, you can format as you like, or copy data to Numbers or Excel if you're more comfortable there.


Some notes on this:

(1) I couldn't find a way to edit the dates into a more readable format as M UND M describes for Excel. Since I measure daily, I just entered the date for the first day, then grabbed the lower right corner of the cell and dragged it down the column to fill in the dates myself. Or you could save the Libre file as a xlsx and then maybe M's instructions will work.

(2) Not sure if anyone else was this clumsy, but I had trouble finding a way to get the xml file in Health. You can't go straight from "Blood Pressure", "Heart Rate", etc. You have to go to "All" under Health Data and import a bunch of data you might not want. You can edit this out directly in the xml file (if you have access to Xcode or other software), or delete it after it's pasted into your spreadsheet.

(3) This is why I have 3 different types of spreadsheet software. None of them do everything I want!

Dec 30, 2014 5:06 PM in response to not sold on lion

I downloaded phone view app. This allowed me to get at my app data which is store in anSQLite database. I was able to bring this into microsoft access and create the reports I want which I'll then dump to excel to chart my stats. I've still not figured out how everything is stored in the database though. I don't see a date field for the food entries or anything that might link to another source for dates. The dates are included in the exported csv file sent from the app so the combination of that and the sqlite/access process allows me to create the report I want with all the nutritional information I enter instead of the limited fields provided in the csv export from the app. All the non-food exports are fine.


I've got mac as my primary machine but still have my old laptop. I love my mac but I've got enough things that mac doesn't work well for that I think I'll always have both...

Exporting Health app data

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.