how to create many tables report?

조회 수: 2 (최근 30일)
steban arriagada
steban arriagada 2020년 11월 5일
답변: Rahul Singhal 2020년 11월 10일
Hello,
I am making boards and would like to mark the bottom edge of certain rows.
Aside as I can create two separate tables I have tried with this code.
import mlreportgen.report.*
import mlreportgen.dom.*;
doc = Document('tables', 'docx');
t=Table(vigente);%
t.Style={Border('solid'),RowSep('none'),ColSep('solid')};
append(doc,t);
t1=Table(vigente2);
t.Style={Border('solid'),RowSep('none'),ColSep('solid')};
append(doc,t1);
close(doc);

답변 (1개)

Rahul Singhal
Rahul Singhal 2020년 11월 10일
You can customize the border for any table row or any specific entry in the table.
For example, below code specifies a custom bottom border for all the entries in the third row of the table:
import mlreportgen.dom.*;
doc = Document('tables', 'docx');
t = Table(magic(5));
t.Style = {Border('solid'),RowSep('none'),ColSep('solid')};
% Specify a bottom border format
bottomBorder = Border;
bottomBorder.BottomColor = 'red';
bottomBorder.BottomStyle = 'solid';
% Add bottom border format to all the entries in the third row of the table
row3 = t.row(3);
row3Entries = row3.Children;
for i = 1:length(row3Entries)
row3Entries(i).Style = [row3Entries(i).Style {bottomBorder}];
end
append(doc,t);
close(doc);
rptview(doc);

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by