Report generation without rptgen
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, I'm running a program on R2012a that gives me various outputs in the form of plots and text. I need these to be documented in a report (preferably .doc or .pdf). What i need basically is that when i run the program, a word doc or pdf must open in the end, that includes all the results. It need not be saved in a pre-defined location; the user can save it anywhere he wishes to. I do not have Report Generation, so is there a code that can do this?
I do know the code to create a new word doc with some text and figures that are already stored in a folder.
% % --- Generate report.
%%Start Microsoft Word
Word_COM = actxserver('Word.Application');
set(Word_COM,'Visible',1);%Make Word visible
% Create a document
File_COM = Word_COM.Documents.Add;%Creates a new document
% Add some text
Word_COM.Selection.TypeText('Test');
Word_COM.Selection.TypeParagraph;
Word_COM.Selection.InlineShapes.AddPicture('D:\Plots\figure1.fig');
Word_COM.Selection.MoveRight(1);
Word_COM.Selection.TypeParagraph;
I am able to save the plots into a folder, but when i try to import them into the word doc, they appear just as a box which says "Image can't be displayed". Maybe this is because they get saved in the standard matlab .fig format. However, even if i can get the plots right, i cannot enable the code to import text, unless i myself type it within those quotes (Word_COM.Selection.TypeText('*Test*');), which is not what i want!
Anyways, if someone knows how it can be done, i would be grateful!
0 Commenti
Risposte (1)
Vedere anche
Categorie
Scopri di più su MATLAB Report Generator in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!