This issue is an Excel issue, not a Matlab one.
You need to use the 'convert data to columns' option in Excel.
You might try to write a tab separated file instead, which is more often detected correctly by Excel.
a = [1 2 4];
writematrix(a,'abcd.csv','Delimiter','tab')
%technically you should use .tsv instead, but hardly anyone does that