Cannot export coherence or averaged EEG file to csv

I am having trouble export average or coherence data to a csv or excel format.
No error box comes up but instead it continues to try and load. However it does load a file but there is nothing in it except for a '/' or the word 'Time' with each letter in a different cell.
This is also now happening with data that i have previously exported.
below is the error:

Warning: Could not start Excel server for export.
XLSWRITE will attempt to write file in CSV format.

In xlswrite (line 174)
In out_matrix_ascii (line 149)
In export_data (line 296)
In tree_callbacks>@(h,ev)export_data(GetAllFilenames(bstNodes)) (line 1302)
Warning: Could not start Excel server for export.
XLSWRITE will attempt to write file in CSV format.
In xlswrite (line 174)
In out_matrix_ascii (line 150)
In export_data (line 296)
In tree_callbacks>@(h,ev)export_data(GetAllFilenames(bstNodes)) (line 1302)
Error using xlswrite (line 187)
An error occurred on data export in CSV format.

Error in out_matrix_ascii (line 150)
                xlswrite(OutputFile, Label1(:),  SheetName, 'A2');


Error in export_data (line 296)
                out_matrix_ascii(ExportFile, F, FileFormat, {ChannelMat.Channel.Name},
                DataMat.Time, []);


Error in tree_callbacks>@(h,ev)export_data(GetAllFilenames(bstNodes)) (line 1302)
                jMenuExport = gui_component('MenuItem', [], [], 'Export to file',
                IconLoader.ICON_SAVE, [], @(h,ev)export_data(GetAllFilenames(bstNodes)));


Caused by:
    Error using dlmwrite (line 112)
    The input cell array cannot be converted to a matrix.

Any help would be appreciated.
many thanks
Josh

You reported two distinct errors. It doesn’t look like they correspond to the same type of problem.
When is one or the other occurring? Do you always get the two one after the other?

The first one indicates a communication issue between Matlab and Excel (“Could not start Excel server for export”). Is Excel properly installed on your computer? Can you save a file correctly directly from your Matlab command window using the function xlswrite? If you can’t, you should start by fixing this Matlab-Excel issue first.

The second error suggests there is an issue with the export by dlmwrite of a CSV file.
Does it work if you select an ASCII format (.csv for instance) as the export file format, instead of Excel?

Hi Francois,
Matlab gave me the error it appears that there is an error writing in general from matlab to Mac. It is weird because I used to be able to export it but now a few years later it gives me the error.
Anyway I was able to export it using the ascii csv format so its fine.
Thank you
Josh