Sorry, misunderstood what you were saying. I used iphoneview(?) on my mac and it basically exports as a text file that you can load back up the phone. I'm not sure if this works on 3GS'/SL.
No problem. Here's what someone can use for a PC:
http://www.reincubate.com/labs/iphone-backup-extractor-how-extract-files-iphone-backup-windows/
Use the iPhone Backup Extractor to make a db file of the texts (or any number of other parts in the backup....notes, etc.)
http://menoob.com/2008/12/04/how-to-save-and-read-your-iphone-text-messages-on-your-computer/
You don't necessarily need DiskAid if you already have the backup on your PC, but DiskAid is invaluable if you've somehow crapped your computer and only have the iPhone, since it can read the iPhone and get your backup on to a computer. After extracting the part of the backup you want, use the linked SQLite Database Browser to then make a csv file that can be read by Excel or other programs. You'll be able to at least see your messages (or any number of other parts in the backup....notes, etc., that you extracted from the backup above).
Of course, that's only to look at the files. Getting them back on the iPhone is problematic unless your jail broke.
BTW, this is how you'd get contacts from a backup:
It's easy to restore the contact information from an iPhone backup. Follow these steps:
1. Using the iPhone Backup Extractor, restore the file "Libray/AddressBook/AddressBook.sqllitedb". This is a SQL Lite database file with all of your contacts.
2. Use the SQLite Database Browser.
3. Open the restored file with the SQLite Database Browser , choose the "Execute SQL" tab and paste this into the "SQL string" field:
select ABPerson.first,ABPerson.last,ABMultiValue.value from ABPerson,ABMultiValue where ABMultiValue.record_id=ABPerson.ROWID
4. When you press the "Execute Query" button, you will see your full contact list shown in the "Data returned" field.
You can then paste that to an Excel file or wherever.