File Extensions Name-Value pair error
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Text Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!