To reproduce:
Sub New()
InitializeComponent()
Dim dt As New DataTable()
dt.Columns.Add("Price", GetType(System.Double))
dt.Columns.Add("Name", GetType(System.String))
dt.Columns.Add("Nr", GetType(System.Double))
For i As Integer = 0 To 49
dt.Rows.Add(i, "Data" & i, i)
Next
With Me.RadGridView1
.DataSource = dt
.Columns("Price").FormatString = "{0:C2}"
.Columns("Nr").FormatString = "{0:N1}"
.Columns("Price").ExcelExportType = Export.DisplayFormatType.Currency
'
.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill
End With
Me.RadGridView1.Columns("Price").ExcelExportType = Export.DisplayFormatType.Currency
Me.RadGridView1.Columns("Nr").ExcelExportType = Export.DisplayFormatType.Custom
Me.RadGridView1.Columns("Nr").ExcelExportFormatString = "{0:N1}"
Me.RadGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill
End Sub
Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
Dim spreadStreamExport As New GridViewSpreadStreamExport(Me.RadGridView1)
spreadStreamExport.ExportVisualSettings = True
Dim fileName As String = "..\..\" + DateTime.Now.ToLongTimeString().Replace(":", "_").ToString() + ".xlsx"
spreadStreamExport.RunExport(fileName, New SpreadStreamExportRenderer())
Process.Start(fileName)
End Sub
Workaround:
Me.RadGridView1.Columns("Nr").ExcelExportType = Export.DisplayFormatType.Fixed
AddHandler spreadStreamExport.CellFormatting, AddressOf CellFormatting
Private Sub CellFormatting(sender As Object, e As SpreadStreamCellFormattingEventArgs)
If e.ExportCell.ColumnIndex = 2 Then
e.ExportCell.ExportFormat = "0.0"
End If
End Sub