How to autofit table using MATLAB/Activex?
古いコメントを表示
So I needed to make a table in word using a structure: I used struct2table and then did writetable to a file -> and then I read the file into numeric, text, and raw and then did:
ExAct = get(excel,'Activesheet');
ExActRange = get(ExAct,'Range',sprintf('A1:%c%d',col,nc));
set(ExActRange,'Value',raw);
I was able to copy this excel table and paste it into a word file but I want to autofit the tables to contents. How would I do this if I did the thing where I invoke(word.Selection.... in order to paste into word?
ALSO if you know an easier way to save a structure into an activesheet let me know - it would only let me set a matrix: not a table or a structure which is why I wrote to excel twice.
採用された回答
その他の回答 (1 件)
Megna Hari
2020 年 12 月 18 日
編集済み: Image Analyst
2020 年 12 月 18 日
2 件のコメント
Image Analyst
2020 年 12 月 18 日
So does your second line of code "fix" the autofitting (since you say the first line does not work)? So after adding that second line, the column will now autofit?
Megna Hari
2020 年 12 月 21 日
カテゴリ
ヘルプ センター および File Exchange で ActiveX についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!