Exporting chart or step data to Excel fails with an error "invalid UTF-8 byte sequence detected"

If you get an error “invalid UTF-8 byte sequence detected” when you export chart or step data to Excel, you can check the “Convert Text to UTF-8” checkbox and try it again.

It happens because the text in the data is not in the UTF8 format.