i am trying to indent the first column after the ultragrid is exported to excel using excelexporter.
If i use indentation, the bands are moved to new cells to the right.
i am trying to increase the margin between the border and the text cell.
how can i do this in excel exporter or ultragrid?
Thanks
Hi Fatih,
You use WorksheetCell.CellFormat.Indent as showing in the code snippet below:
using (exporter = new UltraGridexporter()){ exporter.ExportEnding += (sender, args) => { foreach (WorksheetRow worksheetRow in args.CurrentWorksheet.Rows) { if (worksheetRow.OutlineLevel > 0) { WorksheetCell cell = worksheetRow.Cells[0]; if (cell.Value != null) cell.CellFormat.Indent = worksheetRow.OutlineLevel; } } }; // add other event handlers exporter.Export(ultraGrid, filePath, WorkbookFormat.Excel2007);}
Best Regards,Shaolin