Ordering the name of excel files from short to longer length
1 次查看（过去 30 天）
I have a script which split an excel file into several excel files using this code:
data = readtable('dataset.xlsx');
stations = unique(data.Station);
x = data(data.Station==stations(i), :);
FYI, each file created using such code has different lengths. For example:
Sta_1 --> 8 rows;
Sta_2 --> 3 rows;
Sta_3 --> 6 rows.
My question is... is it possible to order from the shorter length to longer length when using writable function?
So, I want the file names is ordered based on the length of the file, i.e.,
Sta_1 --> file with 3 rows;
Sta_2 --> file with 6 rows;
Sta_3 --> file with 8 rows.