Tutorial by Examples

Each element of text you want to use distinct formatting on should be added separately, by adding to the cell's RichText collection property. var cell = ws.Cells[1,1]; cell.IsRichText = true; // Cell contains RichText rather than basic values cell.Style.WrapText = true; // Required to honor n...
There are a number of properties that can be applied to sections of RichText. var title = cell.RichText.Add("This is my title"); // Data Type: bool // Default Value: false title.Bold = true; // Data Type: System.Drawing.Color // Default Value: Color.Black title.Color = C...
EPPlus also supports the ability to insert text in a cell using the Insert() method. For example: var file = new FileInfo(filePath); using (var p = new ExcelPackage(file)) { var wb = p.Workbook; var ws = wb.Worksheets.FirstOrDefault() ?? wb.Worksheets.Add("Sheet1"); var...

Page 1 of 1