MATLAB: Writing matlab table to excel with spaces in variable names

excelexportMATLABtable

Hello,
Is there are way to write your matlab table to a .xlsx file with spaces in the column names.
Error using test (line 36)
'Save Name' is not a valid variable name.
I use another program to call that variable and it needs to have a space in the excel doc. I am currently putting a stop in my code and manually changing it, because I use an underscore so it is valid.
Any help would be great.
Thanks!

Best Answer

No. You will need to convert your content to cell and put the desired names as the first row, and write the cell (without variable name). This was made slightly easier in R2019a with the new writecell()
Related Question