To reproduce:
public class Item
{
public int Id { get; set; }
public string Name { get; set; }
public DateTime Date { get; set; }
public Item(int id, string name, DateTime date)
{
this.Id = id;
this.Name = name;
this.Date = date;
}
}
public Form1()
{
InitializeComponent();
List<Item> items = new List<Item>();
for (int i = 0; i < 10; i++)
{
items.Add(new Item(i,"Item" + i,DateTime.Now.AddHours(i)));
}
this.radGridView1.DataSource = items;
this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
}
private void Form1_Load(object sender, EventArgs e)
{
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-GB");
this.radGridView1.Columns["Date"].ExcelExportFormatString = "M/d/yyyy h:mm tt";
this.radGridView1.Columns["Date"].ExcelExportType = DisplayFormatType.Custom;
GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.radGridView1);
spreadExporter.ExportVisualSettings = true;
SpreadExportRenderer exportRenderer = new SpreadExportRenderer();
string fileName = @"..\..\exportedFile" + DateTime.Now.ToLongTimeString().Replace(":", "_") + ".xlsx";
spreadExporter.RunExport(fileName, exportRenderer);
Process.Start(fileName);
}