Hi,
Can I ask how can i bold a specific text inside a cell? i know that it can be accomplish by
thanks
Can I ask how can i bold a specific text inside a cell? i know that it can be accomplish by
var workbook = new XLWorkbook();
var worksheet = workbook.Worksheets.Add("Sample Sheet");
worksheet.Cell("A1").Value = "<b>test</b>" + System.Environment.NewLine + "test1";
worksheet.Cell("A1").RichText.Substring(3, 4).SetBold(true);
as what you can see my cell value contains html tags and i can set "test" as bold using substring as per the documentation states. my problem is i needed to delete the <b> tags right after i bold the "test" string. i triedworksheet.Cell("A1").RichText.Substring(3, 4).SetBold(true).ToString().Remove(1,2);
and
worksheet.Cell("A1").Value=worksheet.Cell("A1").RichText.Substring(3,4).SetBold(true).ToString().Remove(1, 2);
but doesnt work. can someone help me pls.thanks