csv2cellfast - import CSV files on machines without Excel
A rewritten CSV importer inspired by Arthur Hebert's function.
Vector operations are used instead of loops, which leads to 2x to 10x speed improvements.
Files with a large number of quoted cells (cells that include comma and quote characters) will be slower to be import.
Tested with reasonably large files, with success.
LargeTest.csv 37,099kB 36996x116 cells, (old) Core2 Duo processor 8GB RAM
csv2cell -> Elapsed time is 485.225848 seconds.
csv2cellfast -> Elapsed time is 50.024777 seconds.
xlsread -> Elapsed time is 22.757315 seconds. - But this requires excel for CSV files
Arthur Hebert (2020). csv2cell (https://www.mathworks.com/matlabcentral/fileexchange/20836-csv2cell), MATLAB Central File Exchange. Retrieved April 27, 2020.
Cite As
Andrew Dyer (2024). csv2cellfast - import CSV files on machines without Excel (https://www.mathworks.com/matlabcentral/fileexchange/75219-csv2cellfast-import-csv-files-on-machines-without-excel), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.