how to stop xlsread from trimming empty cells?
Show older comments
hello, I am working with xlsread to process some excel data. I need the matrix created by xlsread to NOT trim empty cells.
I have tried:
[~, ~, distress_data] = xlsread(observed_distress,'','E12:N1000')% keeps all data in type 'cell'
distress_data = cell2mat(distress_data);% results in error 'All contents of the input cell array must be of the same data type'
This error is produced even when all the empty cells are replaced with zeros.
Any help would be great!
Thanks,
1 Comment
Shoaibur Rahman
on 31 Dec 2014
Make sure that all elements in distress_data are in cell type after replacing the empty cells.
Answers (0)
Categories
Find more on Data Import from MATLAB 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!