How to autofit table using MATLAB/Activex?
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (1)
Megna Hari
am 18 Dez. 2020
Bearbeitet: Image Analyst
am 18 Dez. 2020
2 Kommentare
Image Analyst
am 18 Dez. 2020
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
am 21 Dez. 2020
Kategorien
Mehr zu ActiveX finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!