Hi,
I need to apply font size and wrap text as true to all cells in a given worksheet, as we have worksheet.cells.Fontsize and worksheet.cells.wraptext in interop to do this
How can we do this using infragistics, if not possible please mention any alternative so that this can be achived.
Thanks
This is currently not possible to set at the worksheet level. You can submit a feature request for this. Currently, the fastest and most memory efficient way I can think of to do this would be to loop over all column and set these properties at the column level:
Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets.Add("Sheet1"); IWorksheetCellFormat columnFormat = workbook.CreateNewWorksheetCellFormat(); columnFormat.Font.Height = 400; columnFormat.WrapText = ExcelDefaultableBoolean.True; int maxColumnCount = Workbook.GetMaxColumnCount(workbook.CurrentFormat); for (int i = 0; i < maxColumnCount - 1; i++) worksheet.Columns[i].CellFormat.SetFormatting(columnFormat); workbook.Save("Book1.xls");