How can I place an external link inside a table entry using MATLAB report generator?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sven Månsson
am 25 Aug. 2018
Kommentiert: Sven Månsson
am 28 Aug. 2018
I expected the following code to work:
import mlreportgen.dom.*
L = ExternalLink('file://myFile.pdf','myText');
TE = TableEntry(L);
but i get the error:
No constructor 'mlreportgen.dom.TableEntry' with matching signature found.
0 Kommentare
Akzeptierte Antwort
Amal George M
am 28 Aug. 2018
Bearbeitet: Amal George M
am 28 Aug. 2018
Hi Sven,
I understand, from the shared code, that you are facing issues with "TableEntry()".
This error occurs when a call is made to a function without the correct input or output arguments. In this case, the error originates from line 3.
TE = TableEntry(L);
TableEntry accepts ' text object' or ' DOM object' as input. Here, 'L' is an object of 'mlreportgen.dom.ExternalLink class'.
Here is a custom example of adding an external link in a table.
import mlreportgen.dom.*;
doc = Document('test');
table = Table(2);
table.Border = 'single';
row = TableRow;
ent=TableEntry();
append(ent,ExternalLink('https://www.mathworks.com/','entry 1'));
append(row, ent);
te = TableEntry('data');
te.Border = 'single';
append(row, te);
append(table,row);
append(doc,table);
close(doc);
rptview(doc.OutputPath);
Thanks
Amal
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!