Requirements:
Download and install the following:
Use DiskAid to transfer text messages from iPhone to mac/PC:
1. Connect your iPhone to your computer.
2. Open DiskAid
3. Click the pull-down at the bottom of the screen where it says Media Folder and
select Root Folder (click Go Ahead when a warning window pops up).
4. Click User -> Library -> SMS -> sms.db.
5. Click the Copy to Folder icon above and save the “sms.db” file to a folder in your
computer.
6. From your compuer, right-click on sms.db and open it with the SQLite Database
Browser application you just installed.
7. From the SQLite Database Browser, click on the menu File -> Export -> Table as CSV
file.
8. On the Table name drop-down list, select message and click Export.
9. Save the file with a .csv extension (ex. sms.csv).
10. Open the file with MS Excel or any other spreadsheet.
Source: http://menoob.com