Is there a way to automatically extract as many header columns as is available? Each csv file will have a different number of header columns.
1 次查看(过去 30 天)
显示 更早的评论
Example:
If I wanted to add header columns 2 to 4, I would use:
header = bud_serials.Properties.VariableNames;
app.SelectTestID.Items = header(2:4);
However, if the number of header columns changes each time, how would I automatially extract the available header columns that exist. Each CSV file I extract from will have a different number of header colunns.
0 个评论
采纳的回答
Walter Roberson
2022-7-27
app.SelectTestID.Items = header(2:end);
will skip the first column and give you the names of the rest.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Export 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!