How can I set text orientation in Excel using matlab actxserver?
31 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Cameron
on 30 Dec 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;
More Answers (0)
See Also
Categories
Find more on Use COM Objects in MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!