In Matlab AppDesigner -> Generation of a Report with a Word Template: Problem with Input Arguments for function 'Document'

19 次查看(过去 30 天)
Hello,
i have a problem with the generation of a report in matlab app designer.
Here you can find the code:
import mrlreportgen.dom.*;
D = Document('My_Report', 'docx', 'Templates/Report_Template_1.dotx');
open(D);
moveToNextHole(D);
append(D, 'Text für Hole 1');
moveToNextHole(D);
append(D, "Text für Hole 2")
close(D);
Error: "Undefined function 'Document' for input arguments of type 'char'."
When i change the quotation marks from this ' to this ". There is a diffrent Error.
Different Error: Undefined function 'Document' for input arguments of type 'string'.
The Folder structure should be fine and the holes in the Word Template are those "Richt-Text"-holes.
So should also be fine. In all videos and examples i saw, was the structure the same. So i dont know
whats wrong.
Can someone help me with this problem?
Thanks.

采纳的回答

Steven Lord
Steven Lord 2024-3-27
The mlreportgen.dom.Document Class is in the mlreportgen.dom namespace. What did you import?
import mrlreportgen.dom.*;
You have an extra r.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Report Generator 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by