Write cells to individual excel sheets
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I'm having problems writting individual cells to individual sheets in excel. It states an invalid data range. I need to add the cell IDs above the orginal data.
Attached is the code for xlswrite.
Thanks
Load('Sample_data.mat');
Fnane = 'PD.xlsx';
%add cell ID above PD data for each cell.
for n = 1:numel(Sheet_names)
PD_adpt{n}(2,:) = PD_adpt{n}(1,:);
PD_adpt{n}(1,:) = Cell_ID;
end
for ii = 1:numel(PD_adpt)
xlswrite(Fnane,PD_adpt{ii},'sheet',sheet_names(ii))
end
3 件のコメント
回答 (1 件)
Dave B
2021 年 11 月 4 日
編集済み: Dave B
2021 年 11 月 5 日
xlswrite(Fnane, PD_adpt{ii}, sheet_names(ii))
But in general you might have a better time if you use writematrix/writecell/writetable instead of xlswrite
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!