Place the file in the resourcefolder.
As an update, I found a fix for this without the need of a temporary file. I added the BOM signature to the StringWriter and after this single line of code Excel correctly interprets the character encoding, showing special characters properly.
StringWriter sw = new StringWriter();
// create char separator which is input for the CSVWriter
char separator = separatorString.charAt(0);
// 20180711 - Ivo Sturm: add BOM signature to the file as a starter. This is needed to make sure Excel directly interprets special characters correctly.
sw.write('\uFEFF');
After this, create the lines with the content of your liking. For me it was iterating through a set of MendixObjects.