Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
880
Setting font on Excel Exporter
posted

I found an example online from one of your articles here.
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Infragistics2.Excel.v8.2~Infragistics.Excel.Workbook~CreateNewWorksheetCellFormat.html

I tried the same method to set the font from Segoe UI to Verdana, but it is not working.  Does anyone know if this is a known issue or if I am missing something?

 

UltraGridExcelExporter exporter = new UltraGridExcelExporter();
Workbook workbook = new Workbook();
Worksheet worksheet;

 

IWorksheetCellFormat styleFormat = workbook.CreateNewWorksheetCellFormat();
styleFormat.Font.Name =
"Verdana";
workbook.Styles.AddUserDefinedStyle(styleFormat,
"Custom Cell Style");

 

foreach (UltraGrid grid in grids)
{
  worksheet = workbook.Worksheets.Add(grid.Tag.ToString());
  exporter.Export(grid, worksheet);
}

Parents Reply Children
No Data