xlswrite substitute that writes to specific columns

2 ビュー (過去 30 日間)
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2021 年 4 月 10 日
コメント済み: Jeremy Hughes 2021 年 4 月 11 日
I would like to write a matrix to specific columns and rows of excel. xlswrite has this option but for compatibility issues I would want to find a substitue for it. Writetable or writematrix does not have this option (xlswrite(filename,A,xlRange)).
Any idea?

採用された回答

Jeremy Hughes
Jeremy Hughes 2021 年 4 月 10 日
This syntax is equivalent to writematrix(A,filename,'Range',xlRange)
  2 件のコメント
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2021 年 4 月 10 日
I receive this error:
Error using strlength
First argument must be text.
Error in writematrix (line 147)
n = strlength(varargin{i});
Error in Boundaryfinder (line 57)
writematrix(fullFileNameofxy,B(:,2),sheet,xlRange)
B(:,2) is a colmun of numbers. xlRange is 'A2' and sheet is 1.
Jeremy Hughes
Jeremy Hughes 2021 年 4 月 11 日
Note the signatures are different.
The first input is the data, and the second input is the file name. Subsequent inputs need to be Name-Value pairs.
The correct calling syntax would be:
writematrix(B(:,2),fullFileNameofxy,'Sheet',sheet,'Range',xlRange)

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by