Does not properly read csv file

22 views (last 30 days)
I try to read the attached csv file using readtable. But the data does not seem to be read. What can be done?

Accepted Answer

Walter Roberson
Walter Roberson on 14 Apr 2021
readcell() instead of readtable(). Your file mixes data types.

More Answers (1)

Thomas Jensen
Thomas Jensen on 14 Apr 2021
Hi,
Try to use readtable('test.csv','Format','%s,%s'). It will force the data to be treated as text.
Since you columns are mixing number and date values, it is better to keep it as char and post-process it later.
  1 Comment
alpedhuez
alpedhuez on 14 Apr 2021
Error using readtable (line 245)
Unable to read the entire file. You may need to specify a different format, delimiter, or number of header lines.
Note: readtable detected the following parameters:
'Delimiter', ',', 'HeaderLines', 0, 'ReadVariableNames', true

Sign in to comment.

Tags

Products

Community Treasure Hunt

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

Start Hunting!