how to stop xlsread from trimming empty cells?

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

Make sure that all elements in distress_data are in cell type after replacing the empty cells.

Sign in to comment.

Answers (0)

Categories

Asked:

on 31 Dec 2014

Commented:

on 31 Dec 2014

Community Treasure Hunt

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

Start Hunting!