Stanley Horwitz

Q: 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

Close

Q: Exporting Health app data

  • All replies
  • Helpful answers

Page 1 Next
  • by JLiljegren,Solvedanswer

    JLiljegren JLiljegren Oct 8, 2014 12:55 PM in response to Stanley Horwitz
    Level 1 (10 points)
    Oct 8, 2014 12:55 PM in response to Stanley Horwitz

    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.

  • by Stanley Horwitz,

    Stanley Horwitz Stanley Horwitz Oct 8, 2014 1:12 PM in response to JLiljegren
    Level 4 (2,706 points)
    Oct 8, 2014 1:12 PM in response to JLiljegren

    JLiljegren, Thanks for the tip. Its a start in the right direction, but the resulting file is in XML format. Now, I need to find a way to open that file in Excel or Apple's Numbers app.

  • by rugburn,

    rugburn rugburn Oct 22, 2014 2:37 PM in response to JLiljegren
    Level 1 (0 points)
    Oct 22, 2014 2:37 PM in response to JLiljegren

    Have you figured out the data layout? I am trying to spreadsheet the steps data and the format is difficult to decipher...

  • by Stanley Horwitz,

    Stanley Horwitz Stanley Horwitz Oct 22, 2014 7:14 PM in response to rugburn
    Level 4 (2,706 points)
    Oct 22, 2014 7:14 PM in response to rugburn

    Hi rugburn, Sorry, but no. I have not had time to study the data layout.

  • by M UND M,

    M UND M M UND M Nov 3, 2014 1:25 PM in response to rugburn
    Level 1 (0 points)
    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.

  • by Stanley Horwitz,

    Stanley Horwitz Stanley Horwitz Nov 4, 2014 9:32 AM in response to M UND M
    Level 4 (2,706 points)
    Nov 4, 2014 9:32 AM in response to M UND M

    I am using a Mac. I have Excel 2011, but it does not have an option to import XML files, like Excel does on Windows. Sigh!

  • by ludlowboy,

    ludlowboy ludlowboy Nov 13, 2014 2:53 PM in response to M UND M
    Level 1 (0 points)
    Nov 13, 2014 2:53 PM in response to M UND M

    Hi,

    I would really like to be able to convert the times in the exported data to something that I can understand.

    Please would you let me know how to convert the time values.

    Best wishes Ludlowboy

  • by M UND M,

    M UND M M UND M Nov 17, 2014 8:11 AM in response to ludlowboy
    Level 1 (0 points)
    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.

  • by shirleyfromcalgary,

    shirleyfromcalgary shirleyfromcalgary Dec 6, 2014 1:19 AM in response to M UND M
    Level 1 (0 points)
    Dec 6, 2014 1:19 AM in response to M UND M

    I Have a similar question for a similar app. It has export capability but the developer did not include all data fields in their export file. Can I get at the data somehow to extract all data without using their export functionality?  I've tried contacting the developer to request the fields added but have not had any response at all

  • by not sold on lion,

    not sold on lion not sold on lion Dec 30, 2014 12:01 PM in response to Stanley Horwitz
    Level 1 (0 points)
    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!

  • by shirleyfromcalgary,

    shirleyfromcalgary shirleyfromcalgary Dec 30, 2014 5:06 PM in response to not sold on lion
    Level 1 (0 points)
    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...

  • by Arecez,

    Arecez Arecez Jan 11, 2015 6:36 AM in response to JLiljegren
    Level 1 (0 points)
    Jan 11, 2015 6:36 AM in response to JLiljegren

    I have similar problem, but I don't see any "box with the outwards arrow (top right)"… Any ideas?

  • by Sigmund Lundgren,

    Sigmund Lundgren Sigmund Lundgren Jan 14, 2015 1:19 PM in response to Stanley Horwitz
    Level 1 (0 points)
    Jan 14, 2015 1:19 PM in response to Stanley Horwitz

    I developed a groovy script for exactly that purpose, it reads the xml file created by the health app during export and prints bloodpressure, heart rate and steps to the screen, can easily be piped to a csv file and imported into an excel sheet. Command line only, and early alpha version..

     

    Sigmund

  • by rainev,Helpful

    rainev rainev Jan 27, 2015 3:53 AM in response to Arecez
    Level 1 (5 points)
    Jan 27, 2015 3:53 AM in response to Arecez

    You have to go to All in order for the export button on the top right to appear.

Page 1 Next