How to use array2table without having headers?

9 ビュー (過去 30 日間)
Austin Welch
Austin Welch 2018 年 9 月 7 日
回答済み: Navdha Agarwal 2019 年 6 月 21 日
I am converting an array to a table so I can write it to an excel file, but I dont want the headers that appear when I convert it to a table because when I write it to an excel file the first row in the excel file has the headers. I don't want headers in the excel file, I just want my data. Thanks for any help.
  2 件のコメント
Paolo
Paolo 2018 年 9 月 7 日
I am assuming you are using Writetable to write to the Excel file. You can specify the name-value pair :
'WriteVariableNames',false
When calling the function. That will prevent the headers in the file.
Austin Welch
Austin Welch 2018 年 9 月 7 日
This worked perfectly! Thanks!

サインインしてコメントする。

回答 (1 件)

Navdha Agarwal
Navdha Agarwal 2019 年 6 月 21 日
If you have to write an array or a matrix to an excel file, you can do so without even converting it to a table.
Following is the snippet for the same.
A=[1 2 3;4 5 6] % Suppose this is the matrix you want to write to an excel file
csvwrite('file.csv',A)
This does not take any headers into consideration.

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by