Hi,
For my requirement, i have to export multiple dataset to excel and create multiple sheets. Based on my data i have to create dropdown and populate the cell. For this requirement instead of direct export using excelexport dll, i have created worksheet and updated the value.
My dataset contains several html data (eg:<b><u>Test1<u> Test2</b>). If i place the data inside excell cell, it displaying with node like <b><u>Test1<u> Test2</b>, but i want to display it as formatted text as html(eg: Test1 Test2).
To reproduce this, i will paste here sample code
Infragistics.Excel.Workbook wBook = new Workbook(WorkbookFormat.Excel2007,WorkbookPaletteMode.StandardPalette);
Infragistics.Excel.
Worksheet wSheet = wBook.Worksheets.Add("Export");
wSheet.Rows[2].Cells[2].Value =
"<b><u>Test1</u> Test2</b>";
wBook.Save(@"E:\\Test.xlsx");
It is the urgent requirement for me, any solution for this issue.
Regards,
Micky
You would need to use a FormattedString instead of a normal .Net String. Once you have created a FormattedString with the raw text, set it as the Value of the cell. Then call the FormattedString.GetFont methods to get a font object for a specific range in the string and set properties on that font to format the range.
Hi Mike,
Can you please help me, how to create Formatted string for this html string "<b><u>Test 1></u><i> Test 2</i></b> Test 3 "
Thanks,