Page 1 of 1
String format inside a cell
Posted: Thu Sep 21, 2017 4:01 pm
by MaxChan
Hi, I am able to change the format of the whole cell.
How to change the format inside the cell? I want to BOLD some words in the cell, not all the words within that cell.
Eg:
Cell 1,1 contains below.
(bold Description): TEST
(bold Model): ABC
Re: String format inside a cell
Posted: Tue Sep 26, 2017 12:35 pm
by larsa
Hello
You can use AsSimpleTags
Example
Code: Select all
//* AsSimpleTags let you easily create formatted text with html-like tags.
//* There are no end tags. A tag sets an option, and that option is used
//* until a new tags replaces it. In order to write the "<", character,
//* write an empty tag "<>" in the text. Example: 'Two <> one'
//* The following tags can be uses:
//* <b> Turn bold on.
//* </b> Turn bold off.
//* <i> Turn italic on.
//* </i> Turn italic off.
//* <u> Turn underline on.
//* </u> Turn underline off.
//* <f:Font name> Changes the font name.
//* <s:nn> Changes the font size. Setting the size to zero sets the font size to the default size.
//* <c:xxxxxx> Changes the font color. The value xxxxxx is the hexadecimal RGB color value.
//* If xxxxxx is set to 'Auto', the default color will be used.
XLS[0].AsSimpleTags[1,1] := 'Normal <b>Bold</b> <i>Italic</i> <c:0000FF>Red</c>';
Re: String format inside a cell
Posted: Thu Oct 05, 2017 7:32 am
by MaxChan
Thanks!
I tested, it only accept 1 format, right?
when I apply this '<b><u>GENERAL DESCRIPTION:</u></b> '
I only got underline applied.
Thank you very much!