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

[Solved] Export to excel with third party library npoi issue - displaying two empty columns in the starting in the excel sheet

3 Answers 158 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chetan
Top achievements
Rank 1
Chetan asked on 29 Apr 2013, 11:40 AM
We are using Radgrid with paging. But at the time of export we need to export all records (6000 row and 56 columns). If we use normal export it takes lot of time to export to excel. One more case is that we do not want to use HTML format for excel as it shows warning while opening. Hence we decided to go for third party library NPOI. we are referring to 

http://www.telerik.com/community/code-library/aspnet-ajax/grid/export-to-excel-with-third-party-library-npoi.aspx

One issue is that it is displaying two empty columns in the starting in the excel sheet. All columns are added runtime. I have checked and there is no extra column added. 

<telerik:RadGrid ID="grdDetailreport" runat="server" GridLines="None" AllowSorting="True"
    AllowPaging="True" PageSize="50" AllowCustomPaging="true" AllowFilteringByColumn="true"
    OnNeedDataSource="grdDetailreport_NeedDataSource" OnSortCommand="grdDetailreport_SortCommand"
    OnItemDataBound="grdDetailreport_ItemDataBound" Width="950px">
    <ClientSettings AllowDragToGroup="false">
        <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="5" SaveScrollPosition="true">
        </Scrolling>
    </ClientSettings>
    <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="Bottom"></PagerStyle>
    <MasterTableView RetrieveAllDataFields="false" AutoGenerateColumns="false" EnableColumnsViewState="true"
        AllowCustomSorting="true" CommandItemDisplay="Top" TableLayout="Auto">
        <CommandItemSettings ShowExportToExcelButton="false" ShowAddNewRecordButton="false"
            ShowRefreshButton="false" ExportToExcelText="Export to excel"></CommandItemSettings>
        <Columns>
        </Columns>
    </MasterTableView>
    <ExportSettings IgnorePaging="true">
        <Excel Format="Biff" ></Excel>
    </ExportSettings>
</telerik:RadGrid>

3 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 01 May 2013, 02:41 PM
Hello Chetan,

I would suggest you to use our latest export format (Biff) which won't trigger a warning message as with the HTML format. You could check the following live example and the related resources tab for additional information. If you still experience a performance issue you could use the ExportInfrastructure and export the data directly from the datasource as it is demonstrated in the following code library.

Regards,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Chetan
Top achievements
Rank 1
answered on 06 May 2013, 07:10 AM
How is its performance. Will it be able to export 7000 records efficiently? 
0
Kostadin
Telerik team
answered on 08 May 2013, 12:57 PM
Hello Chetan,

If you use the ExportInfrastructure it will be faster then the Biff export format as the data is exported directly from the datasource. But I believe that both methods will handle to export such amount of data.

Kind regards,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Chetan
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Chetan
Top achievements
Rank 1
Share this question
or