MozillaZine

Export message data to CSV file

User Help for Mozilla Thunderbird
RogerE
 
Posts: 30
Joined: March 26th, 2005, 6:53 am

Post Posted February 10th, 2020, 6:42 am

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

LIMPET235
Moderator

User avatar
 
Posts: 39235
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Post Posted February 10th, 2020, 6:48 am

Moving this to Thunderbird Support...
Ancient Amateur Astronomer
Win-7-HP/IntelĀ® DualCore-2.0GHz/500G HDD/4 Gig Ram/550Watt PSU/350WattUPS/Firefox-20.0-62.0-70.0/T-bird-2.0.0.24/SnagIt-v10.0.1/MWP-7.12.
W.M.Y.C.
(Always choose the "Custom" Install.)

DanRaisch
Moderator

User avatar
 
Posts: 123536
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted February 10th, 2020, 8:04 am

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)".

morat
 
Posts: 3917
Joined: February 3rd, 2009, 6:29 pm

Post Posted February 10th, 2020, 9:15 am

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:

Code: Select all
for %a in ("*.txt") do ( grep -v "^Subject:\|^From:\|^Date:\|^To:\|^$" "%a" > "%~na_fixed.txt" )

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
Last edited by morat on February 13th, 2020, 6:48 am, edited 3 times in total.

RogerE
 
Posts: 30
Joined: March 26th, 2005, 6:53 am

Post Posted February 11th, 2020, 4:22 am

[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.

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 9 guests