This is a migrated thread and some comments may be shown as answers.

[Solved] Excel export problem

1 Answer 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Krzysztof
Top achievements
Rank 1
Krzysztof asked on 26 Jan 2010, 11:09 AM
Hello dear experts.

I trie  to export the value of the grid to excel. All columns except columns of numeric export correctly.
Does anyone know how to solve this problem?

Best regards
Krzysztof

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" 
            GridLines="None" AllowFilteringByColumn="True" AllowSorting="True" ShowGroupPanel="True" 
            ShowFooter="True">  
            <MasterTableView DataSourceID="SqlDataSource1">  
                <Columns> 
                    <telerik:GridBoundColumn DataField="nr_ewid" HeaderText="Nr ewid." AllowFiltering="true" 
                        UniqueName="nr_ewid">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="nr_dok" HeaderText="Nr fakt." AllowFiltering="true" 
                        UniqueName="nr_dok">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="nazwa" HeaderText="Wystawca" AllowFiltering="true" 
                        UniqueName="nazwa">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridDateTimeColumn DataField="data_wplyw" HeaderText="WpÅ‚yneÅ‚a" DataFormatString="{0: dd-MM-yyyy}" 
                        AllowFiltering="true" HeaderStyle-Width="90px" ItemStyle-Width="90px" UniqueName="data_wplyw">  
                    </telerik:GridDateTimeColumn> 
                    <telerik:GridDateTimeColumn DataField="data_wyst" HeaderText="Wystawiona" DataFormatString="{0: dd-MM-yyyy}" 
                        AllowFiltering="true" HeaderStyle-Width="90px" ItemStyle-Width="90px" UniqueName="data_wyst">  
                    </telerik:GridDateTimeColumn> 
                    <telerik:GridNumericColumn DataField="wartosc" HeaderText="Kwota brutto" Aggregate="Sum" 
                        AllowFiltering="true" UniqueName="wartosc" KeepNotRoundedValue="true">  
                    </telerik:GridNumericColumn> 
                    <telerik:GridNumericColumn DataField="wartosc_netto" HeaderText="Kwota netto" Aggregate="Sum" 
                        AllowFiltering="true" UniqueName="wartosc_netto" KeepNotRoundedValue="true">  
                    </telerik:GridNumericColumn> 
                    <telerik:GridBoundColumn DataField="w_obiegu" HeaderText="W obiegu" AllowFiltering="true" 
                        UniqueName="w_obiegu">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="do" HeaderText="Pracownik" AllowFiltering="true" 
                        UniqueName="pracownik">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="przetrzymuje" HeaderText="Przetrzymuje" AllowFiltering="true" 
                        UniqueName="przetrzymuje">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="status" HeaderText="Status" AllowFiltering="true" 
                        UniqueName="status">  
                    </telerik:GridBoundColumn> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">  
                <Selecting AllowRowSelect="True" /> 
                <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 

  Protected Sub cmb_excel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmb_excel.Click  
 
        RadGrid1.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML  
        RadGrid1.ExportSettings.ExportOnlyData = True 
        RadGrid1.MasterTableView.ExportToExcel()  
 
    End Sub 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 28 Jan 2010, 06:40 PM
Hello Krzysztof,

This is not an expected behavior - under normal circumstances you should be able to export the GridNumericColumn flawlessly.
I tried to reproduce this problem on my end but unfortunately to no avail - could you please provide a runnable demo?

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Krzysztof
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or