I am mkaing a report in MATLAB and want to make headrs and footers
18 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am generating a word document in MATLAB without a template, and I want to make the headers and footers. I can only find information online about using holes in a dotx but I don't have dotx and therefore no holes, is there an actual command that inserts headers and footers?
0 Commenti
Risposta accettata
Taylor
il 20 Nov 2025
For Word:
For PDFs:
2 Commenti
Taylor
il 21 Nov 2025
Try this
import mlreportgen.dom.*;
d = Document("MyReport","docx");
open(d);
% Create a header for the current section
header = DOCXPageHeader();
para = Paragraph("Header content here");
para.Bold = true;
append(header, para);
% Attach the header to the current page layout
d.CurrentPageLayout.PageHeaders = header;
% Add report content as usual
append(d, Paragraph("Main body content here"));
close(d);
rptview(d.OutputPath);
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!