Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1995
Summary problem on excel export
posted

Mike,

I am using Infragistics v11.2.2004. In my screen i have a grid and i need fixed summary caption in the first column of the grid. For this requirement i added the summary in runtime.

Now my problem is, if i exported the grid to excel the summary column not coming.

I herewith attached a sample for your reference.

Steps to reproduce:

a) Run the application

b) Click the "Apply Summary" button

    You will get the summary caption in the first column of the grid

c) Click "Excel export" button

Now the datas in the grid exported to the excel but not the summary. Can you guide me to solve this issue?

Grid and excel.zip
  • 469350
    Verified Answer
    Offline posted

    I had to modify your sample to get it to run properly. Your code was setting the TableName on the grid's DataSource for no reason that I could determine and then you were trying to launch Excel through Interop and that didn't work on my machine. But once I changed to code to export the grid to Excel, everything worked fine for me. The summaries appear in Excel exactly as they do in the grid.

    All I changed was this:


        Private Sub UltraButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdExcel.Click

            xlExporter = New Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter
            Dim filename As String = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "x.xls")
            xlExporter.Export(grdReport, filename)
            Process.Start(filename)
        End Sub

    The summaries just display the text - there are no actual calculations being performed in the application or in Excel, because this sample doesn't have an UltraCalcManager.