Removing "VarName" row when exporting table to csv

6 visualizaciones (últimos 30 días)
UserCubed
UserCubed el 29 de Mayo de 2018
Comentada: Ameer Hamza el 29 de Mayo de 2018
I'm trying to export a table to csv, and no matter what I do row 1 always ends up being VarName1, VarName2, etc.
Is it possible to not have this row?
  2 comentarios
KSSV
KSSV el 29 de Mayo de 2018
Show us the code you tried...
UserCubed
UserCubed el 29 de Mayo de 2018
writetable(table, 'test.csv')
The commands here (when writing to csv) all seem to include the variable name row. https://www.mathworks.com/help/matlab/ref/writetable.html
I've also tried doing it manually by importing my csv to a table, but then the row disappears and reappears when you import back to csv.

Iniciar sesión para comentar.

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 29 de Mayo de 2018
Use the following option to disable the variable names in the first row
writetable(table, 'test.csv', 'WriteVariableNames', 0)
  2 comentarios
UserCubed
UserCubed el 29 de Mayo de 2018
That works. Thank you!
Ameer Hamza
Ameer Hamza el 29 de Mayo de 2018
You are welcome.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by