How can I set text orientation in Excel using matlab actxserver?
12 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Cameron
2022-12-30
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;
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!