How to autofit table using MATLAB/Activex?
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (1)
Megna Hari
el 18 de Dic. de 2020
Editada: Image Analyst
el 18 de Dic. de 2020
2 comentarios
Image Analyst
el 18 de Dic. de 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
el 21 de Dic. de 2020
Categorías
Más información sobre ActiveX en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!