How to paste matlab table into Excel with headers

46 visualizzazioni (ultimi 30 giorni)
JFz
JFz il 5 Ott 2016
Risposto: Patrick Broughton il 19 Apr 2022
Hi,
I have a table in Matlab with many rows. I can copy from Matlab and paste into Excel. But the headers are gone. How to copy the headers into Excel as well? Thanks for any help.
JZ

Risposte (2)

Patrick Broughton
Patrick Broughton il 19 Apr 2022
Copy and paste your table. Then run header = string(tableName.Properties.VariableNames); and copy and paste the output into your excel book.

Matthew Eicholtz
Matthew Eicholtz il 5 Ott 2016
Try using writetable instead of copy-and-paste.
  1 Commento
JFz
JFz il 6 Ott 2016
I see. But That is slower because you have to write it into a file. I would like to just copy it into a spreadsheet that already has some data and I can do some comparison.

Accedi per commentare.

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by