how to modify the table height in power point

9 views (last 30 days)
Richard ZHANG
Richard ZHANG on 2 Apr 2018
Answered: BhaTTa on 14 Oct 2024
I used the matlab to create a table in power point so far it works OK. Problem happened on trying to modify one rows width, code like this; ________________________________________;
pptFile = 'demoPorblem.pptx';
openppt(pptFile);
ppt = actxserver('powerpoint.application');
ppt.Visible = 1;
Presentation = get(ppt, 'ActivePresentation');
NS = get(Presentation.Slides, 'Count');
Table1=newSlide.Shapes.AddTable(6,6);
for i=1:6
for j =1:6
Table1.Table.Cell(i,j).Shape.TextFrame.TextRange.text = rnd;
end
end
% merge cell and modify cell(1,1)' font size
Table1.Table.Cell(1,2).Merge(Table1.Table.Cell(1,1));
Table1.Table.Cell(1,1).Shape.TextFrame.TextRange.Font.Size = 30;
% try to modify the row one's height
Table1.Table.Cell(1,1).Shape.TextFrame.AutoSize = 'ppAutoSizeShapeToFitText';
the last line does not work
--- So how can I change one row's height

Answers (1)

BhaTTa
BhaTTa on 14 Oct 2024
i assume that you want to modify the row width, Please refer to the answer below: https://www.mathworks.com/matlabcentral/answers/797262

Categories

Find more on Tables 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!