Export iPhone Texts to Excel
If you're conducting electronic discovery on an iPhone, try using the iMazing software which will allow you to export the content and meta data for text messages to an Excel file. See this site: https://imazing.com/download . The software will prompt you to enter your iTunes encryption backup password before you can access the data from the phone.
You simply choose the messages you want to export and choose the option at the bottom, 'Export to CSV'. The application also allows you to export data for contacts, and call history (showing the time each call began and its duration), and also facilitate the export of photos and notes.