BUG Avoid IndexError on writing empty (row) MI df to excel (GH19543)
- [x] closes #19543 
- [x] Tests added and passed
- [x] All code checks passed
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Hello @wf-r! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:





There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2022-06-15 05:14:21 UTC @github-actions pre-commit
 @github-actions pre-commit @phofl Thanks for your feedback, I think you can take another look. Thanks @wf-r 