File Extensions Name-Value pair error
显示 更早的评论
Error using spreadsheetDatastore
Input folders or files that contain non-standard file extensions
Use File Extensions Name-Value pair to include non-standard file extensions
What is missing or needs correction? I've read Matlab spreadsheetDatastore and other links but nothing helps.
myFolder = 'C:\Users\Abraham\Documents\My Documents';
filePattern = fullfile(myFolder, '**/*.csv');
theFiles = dir(filePattern);
for k = 1 : length(theFiles)
baseFileName = theFiles(k).name;
fullFileName = fullfile(theFiles(k).folder, theFiles(k).name);
fprintf(1, 'Now reading %s\n', fullFileName);
str = string(k);
ssds = spreadsheetDatastore(fullFileName,"OutputType","table");
writetable(ssds, "Table" + " " + str + ".csv");
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!