How can I set text orientation in Excel using matlab actxserver?
30 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Wenquan
el 29 de Dic. de 2022
Editada: Walter Roberson
el 30 de Dic. de 2022
Hello, I'm using matlab actxserver to write a excel table. I want to change the orientation of text. I have checked some VBA codes and tried a few codes. Actually I don't know how to transform a VBA code in Matlab code. I have tried:
eSheet.Range.Orientation=90;
eSheet.Range.XlOrientation=-4171;
They don't work.
Can anyone help with the right syntax. Is there a good guide anywhere for the matlab activex syntax versions of VBA commands ?
0 comentarios
Respuesta aceptada
Cameron
el 30 de Dic. de 2022
Excel = actxserver('Excel.Application');
set(Excel, 'Visible', 1);
Workbooks = Excel.Workbooks;
Workbook = invoke(Workbooks, 'Add');
Excel.ActiveWorkbook.ActiveSheet.Range("C3").Value = "Example Text";
Excel.ActiveWorkbook.ActiveSheet.Range("C3").Orientation = 90;
Más respuestas (0)
Ver también
Categorías
Más información sobre Use COM Objects in MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!