Hi
Health data can be exported directly from the Health app on your iPhone in the form of XML files. These are perhaps most useful when importing and exporting data between apps (a health record received as an XML file can be imported into the Health app, for example).
On your iPhone, in the Health app: go to the Today or Health Data tab, then tap on the icon of a person at the upper-right > tap on Export Health Data (at the bottom of the next screen).
You may find it more convenient to use a third-party app to access, analyse and export Health data in a more user-friendly format.
Heart Rate data can be extracted from Health in CSV format for opening in software such as Excel, for example.
Apps that you may wish to consider using include, for example:
QS Access on the App Store
- A free app.
- Features include:
- "Access your data from HealthKit in a table so you can explore it using Numbers, Excel, R, or any other CSV compatible tool."
Heart Graph on the App Store
- Premium features (a single in-app purchase costing $2.99 in the US, for example) include:
- "Export data to CSV files for further analysis in software such as Excel (by email or Dropbox)"
- "Attach an image of your heart rate graph or zone summary to emails for sharing with others"