The solution requires some fiddling around with basic function such as fprint, etc. Luckily though, there are some really nice solutions on the file exchange. Not sure at the moment which one I am using. Here some links:
http://www.mathworks.com/matlabcentral/fileexchange/7601-cell2csv http://www.mathworks.com/matlabcentral/fileexchange/4400-cell-array-to-csv-file--cell2csv-m- http://www.mathworks.com/matlabcentral/fileexchange/7601-cell2csv
Just put your Output including headers etc. in a cell array (each entry in one cell) and then run the function to generate the csv file.