Hello,
Thank you for your question. Unfortunately, there is no way to export all the email addresses in your cPanel account to a txt or csv file.
You can however export/backup an entire cPanel, which would include the email accounts, if you want to migrate them to another cPanel.
I hope this helps,
John-Paul