Reputation: 13
I am working on Enterprise Architect Add-In for creating requirements element through automation. In the element notes of EA when bold, underlined and hyperlink options are used ,they appear in DataGridView as shown below.
Example of <b>bold</b> , <u>underlined .</u> The image hyperlink is <a href="$imageman://id=1126108845;mdg=Global;name=Exception.bmp;type=Bitmap;"><font color="#0000ff"><u>Exception.bmp</u></font></a>
Similar problem occurs if we write it to Excel as well. How to get formatted text from EA element notes instead of Html Tags.
Upvotes: 0
Views: 440
Reputation: 13701
You can use Repository.GetFormatFromField(string Format, string Text)
From the manual:
String
Notes: After accessing a field that contains formatting, use this method to convert it to your preferred format; returns the field in the format specified.
Parameters:
Format: String - The format to convert the field to; valid formats are:
- HTML - Full HTML
- RTF - Rich Text Format
- TXT - Plain textText: String - The field to be converted
Now how to get RTF or HTML formatted text into Excel or a another target is an entirely different question, which I'm sure already exists on StackOverflow.
Upvotes: 2