If you go to the Health app on the iPhone, tap on your profile button in the upper right corner after opening Health. That page should have your name, medical details, accounts, Privacy, and then below that, Export All Health Data. Tap on that button, and it will prepare and export your health data. Depending on how much information you have, it can take a little while to prepare. Once prepared, you will get a zip file notification for a file called Export, and the share screen, to determine where you want the file. You can email it to yourself, or save it to Files. You are then prompted for the location if you save to files, you should then be able to open it in Excel. If you email it to your computer, you should also have access to it in Excel.