xlswrite Issue: not writing an entire column

5 ビュー (過去 30 日間)
Carolyn
Carolyn 2019 年 1 月 7 日
編集済み: dpb 2019 年 1 月 8 日
I have this dataset that I have done all sorts of analysis on and I've compiled it into this matrix and want to write it to an excel file. Thought that would be easy.
I just used the following:
xlswrite('Data.xlsx',data)
But when I open the new excel file, the entire first column is blank. The 'LEK_01' (or other subject ID) is just not there. Any idea why that is? I checked format of all the entries in the cells and they are all in agreement. I'm not getting any errors either.
Thanks in advance!
  2 件のコメント
nanren888
nanren888 2019 年 1 月 7 日
編集済み: nanren888 2019 年 1 月 7 日
Example of first few rows of "data"?
Carolyn
Carolyn 2019 年 1 月 7 日
This (attached) was attached to my original question. Are you having trouble seeing it?

サインインしてコメントする。

回答 (1 件)

dpb
dpb 2019 年 1 月 7 日
編集済み: dpb 2019 年 1 月 8 日
The first column of data is a column of cells each containing a cell containing...
xlswrite can't handle that.
data(:,1)=data{:,1}; % recast the cells to the cellstrings
xlswrite('Data.xlsx',data) % will work now

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by