The emails were sent from a database form with the message body in the format:
[code]
Child name : Child Name
Child DoB : 26/10/2014
Child Gender : Male
Parent name : Parent Name
Landline No : 0499 999999
Mobile No : 0799999999
Parent email : parentname@gmail.com
Address 1 : 1 The Street
Village : Areaname
Town : Townname
Postcode : XX160XX
Comments : Any added comments here
Added : 13, November 2019 08:50 PM
Data was not saved to database
[/code]
We want to be able to extract the email body data to a CSV file so it can be imported into a database.
I have tried using ImportExport Tools NG but it only seems to export header details:
Subject
From
To
Date/Time
and then every entry has a single word "Subject"
I assume I am doing something incorrectly - or is there another way to export the message (not worried about header details)
Thanks
Roger
Export message data to CSV file
- LIMPET235
- Moderator
- Posts: 39956
- Joined: October 19th, 2007, 1:53 am
- Location: The South Coast of N.S.W. Oz.
Re: Export message data to CSV file
Moving this to Thunderbird Support...
[Ancient Amateur Astronomer.]
Win-10-H/64 bit/500G SSD/16 Gig Ram/450Watt PSU/350WattUPS/Firefox-115.0.2/T-bird-115.3.2./SnagIt-v10.0.1/MWP-7.12.125.
(Always choose the "Custom" Install.)
Win-10-H/64 bit/500G SSD/16 Gig Ram/450Watt PSU/350WattUPS/Firefox-115.0.2/T-bird-115.3.2./SnagIt-v10.0.1/MWP-7.12.125.
(Always choose the "Custom" Install.)
- DanRaisch
- Moderator
- Posts: 127233
- Joined: September 23rd, 2004, 8:57 pm
- Location: Somewhere on the right coast
Re: Export message data to CSV file
Which option in the ImportExportTools NG menu did you choose for that export? There are two relating to CSV output. If you chose the one at the bottom ("Export all messages in a folder->Just index (CSV)") it did what it was supposed to. The option you want may be Tools->ImportExportTools NG->Export all messages in the folder->Spreadsheet (CSV)".
-
- Posts: 6426
- Joined: February 3rd, 2009, 6:29 pm
Re: Export message data to CSV file
Ask whoever to export the data to csv or txt files, then send those files using a zip file.
P.S.
An idea...
Tools > ImportExportTools NG > Export all messages in the folder > Plain text format
Command Prompt:
Open the *_fixed.txt files in LibreOffice Calc using the ":" separator with the trim spaces option.
Grep for Windows
http://gnuwin32.sourceforge.net/packages.html
http://gnuwin32.sourceforge.net/packages/grep.htm
http://www.gnu.org/software/grep/manual/grep.html
P.S.
An idea...
Tools > ImportExportTools NG > Export all messages in the folder > Plain text format
Command Prompt:
Code: Select all
for %a in ("*.txt") do ( grep -v "^Subject:\|^From:\|^Date:\|^To:\|^$" "%a" > "%~na_fixed.txt" )
Grep for Windows
http://gnuwin32.sourceforge.net/packages.html
http://gnuwin32.sourceforge.net/packages/grep.htm
http://www.gnu.org/software/grep/manual/grep.html
Last edited by morat on February 13th, 2020, 6:48 am, edited 3 times in total.
-
- Posts: 30
- Joined: March 26th, 2005, 6:53 am
Re: Export message data to CSV file
[quote="DanRaisch"]Which option in the ImportExportTools NG menu did you choose for that export? There are two relating to CSV output. If you chose the one at the bottom ("Export all messages in a folder->Just index (CSV)") it did what it was supposed to. The option you want may be Tools->ImportExportTools NG->Export all messages in the folder->Spreadsheet (CSV)".[/quote]
It is the "Export all messages in the folder->Spreadsheet (CSV)" that I assumed would work, and produces the result I indicated.
It is the "Export all messages in the folder->Spreadsheet (CSV)" that I assumed would work, and produces the result I indicated.