Reading and storing data efficiently - from spreadsheet to cell array
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everybody,
I am wondering what is the most efficient way to read data from a spreadsheet file and store it in the most efficient data structure. The question is general, but I also provide the way I do to welcome any suggestion.
I read data from very long spreadsheet (hundred-of-thousands rows for each sheet), and I need to store only one column for each sheet.
for j = 1:12
Data = readtable(filename, 'Sheet', j+1, 'ReadVariableNames', false);
Data = table2array(Data(:,3));
Data = rmmissing(Data);
filenameOutput = [outputDir, indexName{i}, monthName{j}, '.mat'];
save(filenameOutput, 'Data');
end
What is the most efficient way to do it?
And what about if I want to store the data in a cell format (that is, a N(i)x1 cell where N(i) is the variable length of each column)?
Thank you very much in advance
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!