From: Matt Fig on
It looks like you have a sparse array. This works:

A = diag(1:20)
B = sparse(A) % A sparse version of A.
xlswrite('myworksheet.xls',B) % Write the sparse array to the xls spreadsheet.

What problem are you having?