Why can't I import the following file using the following command?
5 views (last 30 days)
Show older comments
When I type:
>> b = readtable('24198 1A 1.tif_8.csv');
I have no errors and the table is imported nicely.
When I type:
>> b = readtable('24198 1A 1.tif_9.csv');
I get:
Error using textscan Out of memory. Type HELP MEMORY for your options.
Error in table/readTextFile (line 160) raw = textscan(fid,format,'delimiter',delimiter,'whitespace',whiteSpace, ...
Error in table.readFromFile (line 41) t = table.readTextFile(filename,otherArgs);
Error in readtable (line 114) t = table.readFromFile(filename,varargin);
I can't seem to understand why this happens. I have tens of these cdv files and all import fine except for 24198 1A 1.tif_9.csv.
Why?
1 Comment
Alessandro Masullo
on 9 Jan 2015
The error is Out of memory, how big is the file you are trying to open?
Answers (2)
Star Strider
on 9 Jan 2015
I can’t reproduce the error with:
b = readtable('24198 1A 1.tif_9.csv');
It imports and creates the table without problems in R2014b.
It’s an Excel-formatted file, so see if:
[d,s,r] = xlsread('24198 1A 1.tif_9.csv');
works for you.
2 Comments
Star Strider
on 9 Jan 2015
It could be. I don’t imagine there would be significant version differences, but there could be.
Can you open it in Excel (outside of MATLAB) by clicking on it?
I’m out of ideas otherwise, since I can’t reproduce the problem.
Image Analyst
on 9 Jan 2015
You're missing a column header for the first column. Try this to ignore that.
t = readtable('24198 1A 1.tif_9.csv', 'readRowNames', true);
2 Comments
Image Analyst
on 10 Jan 2015
I tried it again with my lowly 8 GB RAM memory, i5-CPU computer and it ran fine and loaded a 45x45 table. Are you sure you gave us the full file and not a smaller subset?
See Also
Categories
Find more on Spreadsheets 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!