Writing matlab table to excel with spaces in variable names?

7 views (last 30 days)
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!

Accepted Answer

Walter Roberson
Walter Roberson on 13 Jul 2019
Edited: Walter Roberson on 13 Jul 2019
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()

More Answers (0)

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!