Mail Merge doesn't seem to have an obvious way of using a CSV file as a data source.
What I tried:
Other external data source
There it only propose various database types (MySql, dBase), applications with address books (Thunderbird), etc. but no CSV
However, there is "text".
When I chose that, I can navigate to the directory where I have my CSV file stored, but no matter whether I call them something.csv or something.txt they are not shown.
Maybe it's possible, but for sure it's not "discoverable".
In the end I got my mailmerge working by loading it into a mysql database, but that's not how it's supposed to be, and not how to win over new users (indeed, I was showing a friend how to do mailmerge, and he was shaking his head at the complexity involved... :-( )
After having solved the problem with an import into mysql, I still continued looking for an "easier" solution, and tried out the CSV Jdbc bridge from http://csvjdbc.sourceforge.net/
I could add my CSV directory as a data source all right, but after that I had no luck running the actual mail merge.
After pressing Print, Yes (to forms letter), Ok, I got an error popup without any text. There was just a title bar: "LibreOffice 5.1 - Fatal error" and an otherwise empty box with a yellow (empty) speech bubble and an OK button. After clicking OK, libreoffice crashed.
What should have happened:
- even if the jdbc is somehow faulty, I'd expect a meaningful diagnostic message and no crash.
Again, not a good impression when this happens while attempting to win a newbie over from Microsoft Office.
Here is how I have tested a mail merge CSV bug 108825
1. Tools - Mail merge wizard
2. Next (use current document, default)
3. Next (letter, default)
4. Select address list
5. Add, select the CSV. Field separator is Tab, text separator "
What do you propose to improve the discoverability?
Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
> 1. Tools - Mail merge wizard
Interesting. So there is another completely different workflow to achieve the same goal in another completely different menu.
Yes, yours does work with CSV.
> What do you propose to improve the discoverability?
There should be *one* entry point which proposes *all* the data sources (maybe keep the other entry point as a link?)
This is an interesting bug. On one side, it could be NotABug because it works. On the other side, something is not obvious and needs to be changed. So let's see those issues.
I can't say what comes first: obvious use for all functions or proper documentation.
1. There's always issue of documentation. Help on MailMerge doesn't seem sufficient enough to give details on CSV or even best practices. Can be another bug. But important to know that MailMerge Wizard is reduced from 8 to 5 steps and better from LO 5.2, that MailMerge toolbar is better from LO 5.3 (Bug 98793) and even more useful from LO 6.0 (Bug 109118).
2. There are differences between File->Wizards->Address Data Source and Tools->Mail Merge Wizard and that's not the same. Moreover we have also Tools-> Address Book Source. Not an answer but there's Bug 109124 to discuss that.
As for Wizard and CSV:
3. File->Wizards->Address Data Source has Other external data source. I don't see why that 2nd step with Settings is necessary. Can be another bug or can be discussed here.
4. Database types has "Text" which is not clear enough, it should be "Text (TXT, CSV or custom)". And this bug can be about this.
5. Database types - Spreadsheet with Browse... opens normal "Open" dialog, while Text opens small "Select Path" dialog. Again, I guess it's because there's another Additional Settings dialog. But, this procedure looks more complicated that adding of CSV address list in MailMerge Wizard. Can be this one or another bug.
So, this bug is about 4. renaming "Text" in Address Data Source Wizard to (my proposal) "Text (TXT, CSV or custom)".
Comments on 3. and 5. are welcome.
(In reply to Timur from comment #4)
> So, this bug is about 4. renaming "Text" in Address Data Source Wizard to
> (my proposal) "Text (TXT, CSV or custom)".
You mean the filters in the file browser? It shows "Text Comma Separated (*.csv)" for me (and the workflow is straight-forward). => WFM
> Comments on 3. and 5. are welcome.
> 3. File->Wizards->Address Data Source has Other external data source. I
> don't see why that 2nd step with Settings is necessary. Can be another bug
> or can be discussed here.
No idea but definitely another topic. Maybe something exists.
> 5. Database types - Spreadsheet with Browse... opens normal "Open" dialog,
> while Text opens small "Select Path" dialog.
Cannot follow. These overly complex wizards are a nightmare.
This bug started because File > Wizards > Address Data Source > Other external data didn't list CSV. CSV exists in Text but it may not be obvious.
So proposal is to change "Text" listing to "Text (TXT, CSV or custom)"
Another proposal here is to skip one unnecessary window.
Now 3 windows:
- user enters path to text files but Browse which just selects folder
- then Specify the type of files (step specific to TXT/CSV)
- then Finish lists multiple files where user selects file and Next
- then Fields Assignment etc
Could be 1 window:
- user enters path or browse to *exact* text file
already when text file is selected in the same window there is Specify the settings specific to TXT/CSV
- then Fields Assignment etc
Prior to this Settings window is redundant but that's a separate bug to remove.
Created attachment 179027 [details]
If you talk about this dropdown I'd suggest to use "Text/CSV" since in the next step one of the two options needs to be selected explicitly. And there is no "custom" text option.
(In reply to Timur from comment #6)
> Another proposal here is to skip one unnecessary window.
Not sure it's so "simple" because of the "Test Connection" interaction.
Changing the label is an easyhack. A bit tricky to find the right item but debugging OGeneralPage::initializeTypeList() should help.
The file for the 'Text' menu option is libreoffice/core/connectivity/registry/flat/org/openoffice/Office/DataAccess/Drivers.xcu line 26: <value xml:lang="en-US">Text</value>
Changing this line to <value xml:lang="en-US">Text/CSV</value> is the change asked for.
Finding this was indeed an easy 10 minute issue, I've spent 2 hours looking at how to submit this and would rather be doing somthing more interesting, if someone else wants/knows how to submit this.
(In reply to Rob from comment #9)
> Finding this was indeed an easy 10 minute issue, I've spent 2 hours looking
> at how to submit this...
You could simply use Gerrit's web interface  if you don't want to setup the full developer environment . Of course, adding the real code pointer is of great help as it.
I would like to solve this issue. Assigning it to me. Thanks :)
Added the patch for the same on gerrit. Kindly check. Thank you.
(In reply to Radhey Parekh from comment #12)
> Added the patch for the same on gerrit. Kindly check. Thank you.
Patch link to save time https://gerrit.libreoffice.org/c/core/+/138153
Radhey Parekh committed a patch related to this issue.
It has been pushed to "master":
tdf#113753 Easier use of CSV in Wizards->Address Data Source
It will be available in 7.5.0.
The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.