We’re super excited to announce the immediate availability of Ext.NET 4 Preview! This release includes many new features and improvements and of course one of the biggest changes includes the upgrade to Sencha Ext JS 6.
Results 1 to 4 of 4

Thread: How to export GridPanel to the Excel?

  1. #1
    Member
    Join Date
    Nov 2008
    Location
    Posts
    45

    How to export GridPanel to the Excel?

    Hi,guys,

    How to export GridPanel to the Excel?

    best regards,
    Jachnicky

  2. #2
    Object.NET + Ext.NET geoffrey.mcgill's Avatar
    Join Date
    Jan 2008
    Location
    Canada
    Posts
    8,955

    RE: How to export GridPanel to the Excel?

    Move to "Help" forum from "Open Discussions"

    Geoffrey McGill
    Founder & CEO

  3. #3
    Member
    Join Date
    Apr 2008
    Posts
    1,363

    RE: How to export GridPanel to the Excel?

    If you want to retain the styling and formatting of the GridPanel, it will be hard. However, if you are only looking for a data dump export, you can easily export your datasource as a csv file to Excel.

        Public Shared Sub ExportDataTable(ByVal aDataTable As DataTable, ByVal aWriter As IO.TextWriter)
            Dim colCount As Integer = aDataTable.Columns.Count
    
            'add column headers
            For Each column As DataColumn In aDataTable.Columns
                aWriter.Write(column.Caption & ",")
            Next
            aWriter.WriteLine()
    
            'add cells
            For Each row As DataRow In aDataTable.Rows
                For i As Integer = 0 To colCount - 1
                    aWriter.Write(row(i).ToString.Replace(",", String.Empty) & ",")
                Next
                aWriter.WriteLine()
            Next
    
        End Sub

  4. #4
    Object.NET + Ext.NET geoffrey.mcgill's Avatar
    Join Date
    Jan 2008
    Location
    Canada
    Posts
    8,955

    RE: How to export GridPanel to the Excel?

    Hi jachnicky,

    Exporting to Excel is something I'm really interested in building into the client-side API, although timeline to implement has not been set.


    The following forum post might be helpful, seehttp://forums.ext.net/showthread.php...=3031-7-1.aspx


    Geoffrey McGill
    Founder & CEO

Similar Threads

  1. Export to Excel
    By JonC in forum 1.x Help
    Replies: 9
    Last Post: Nov 13, 2012, 5:59 AM
  2. [CLOSED] Gridpanel export Excel HeaderText
    By CPA1158139 in forum 1.x Premium Help
    Replies: 1
    Last Post: Jun 10, 2012, 10:36 AM
  3. Replies: 5
    Last Post: May 23, 2011, 1:13 PM
  4. Replies: 2
    Last Post: May 22, 2011, 2:12 AM
  5. [CLOSED] Export Data To Excel in Remote Paging GridPanel
    By pdcase in forum 1.x Premium Help
    Replies: 3
    Last Post: Oct 11, 2010, 9:49 PM

Posting Permissions