how to load data and split into 3 columns from app.UITable to file csv

1 回表示 (過去 30 日間)
lyhoang nam
lyhoang nam 2021 年 11 月 4 日
回答済み: Pratik 2024 年 6 月 11 日
T=table(data);
app.UITable.Data=T;
filename='data.csv';
writetable(T,filename,'WriteRowNames', true);

回答 (1 件)

Pratik
Pratik 2024 年 6 月 11 日
Hi lyhoang,
As per my understanding, you want to load data and split into 3 columns from app.UITable to csv file.
Please refer to the following code snippet for the same:
% Assuming you have already loaded the data into a variable named T (from app.UITable)
% Split the data into three columns
column1 = T.Column1;
column2 = T.Column2;
column3 = T.Column3;
% Create a table with the split columns
splitTable = table(column1, column2, column3);
% Save the table to a CSV file
filename = 'data.csv';
writetable(splitTable, filename);
I hope this helps!

カテゴリ

Help Center および File ExchangeData Import and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by