Rename Excel column heading to MATLAB

조회 수: 33(최근 30일)
Megan 2020년 2월 12일
편집: Megan 2020년 2월 19일
Hello everybody question is in the heading

채택된 답변

Bhaskar R
Bhaskar R 2020년 2월 12일
편집: Bhaskar R 2020년 2월 12일
data = readtable('<your xlsx file name>'); % read your file as table
data.Properties.VariableNames = {'Var1', 'Var2', ..... so on as your data and required column names}
writetable(data, '<your xlsx file name>') % write back modified data to excel file
  댓글 수: 3
Bhaskar R
Bhaskar R 2020년 2월 12일
"What do I have to wirte instead of 'Var1'? The variable names of my Excel (KB61_10) or the renamed version (like_01)?" -Yes
"Is it possible do input a csv file?" -Yes
You got error because data in csv file is in not proper way, to avoid error/get data give appropriate inputs to the readtable
for more details

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by