csv2cellfast - import CSV files on machines without Excel

Version 1.0.2 (3.21 KB) by Andrew Dyer
Parses a Windows CSV file into an NxM cell array if strings.
101 Downloads
Updated 27 Apr 2020

View License

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
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.2

typos

1.0.1

Update minor comment typos

1.0.0