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
35
When I use the instance WindGridExcelExport then canceled for error: Message=Parameter is not valid
posted

Hi, My Name is Edmundo Guerrero

 

I am working with the following tools:

 

  • 1. Windows XP SP3
  • 2. Microsoft Visual Studio 2010
  • 3. Version 10.0.30319.1 RTMRel
  • 4. Installed Version: Premium
  • 5. Microsoft .NET Framework
  • 6. Version 4.0.30319 RTMRel
  • 7. Using Vb.Net
  • 8. NetAdvantage 11.1 Win CLR 2x
  • 9. Reference Named:
  • 10. infragistics2.documents.excel.v11.1
  • 11. infragistics2.win.ultrawingrid.excelexport.v11.1
  • 12. Application Styling Configuration Dialog
  • 13. The program is compiled and shows 0 errors, 0 warnings and 0 messages

 

The Problem.

 

When I instantiate the UltraWingGrid.ExcelExport as shown below:

 

 If e.Tool.Key = "Exportar a Excel" Then

            Dim HojaExcel As New UltraGridExcelExporter

            HojaExcel.Export(Me.UltraGrid1, "c:\pais.xls")

            Process.Start("c:\pais.xls")

        End If

 

and run the program the following errors message displayed:

 

System.ArgumentException was unhandled by user code

  Message=Parameter is not valid.

  Source=System.Drawing

  StackTrace:

       at System.Drawing.Graphics.GetHdc()

       at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter..ctor()

       at MenuPrincipal.pais.UltraToolbarsManager1_ToolClick1(Object sender, ToolClickEventArgs e) in E:\Sistema Minerva2010\MP\MP100\MenuPrincipal\pais.vb:line 281

       at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnToolClick(ToolClickEventArgs e)

       at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.FireEvent(ToolbarEventIds id, EventArgs e)

       at Infragistics.Win.UltraWinToolbars.ToolBase.OnToolClick()

       at Infragistics.Win.UltraWinToolbars.ToolBase.OnToolClick()

       at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.DoClickProcessing(MouseEventArgs e)

       at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.OnMouseUp(MouseEventArgs e)

       at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)

       at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)

       at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)

       at Infragistics.Win.UltraControlBase.OnMouseUp(MouseEventArgs e)

       at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.OnMouseUp(MouseEventArgs e)

       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

       at System.Windows.Forms.Control.WndProc(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

  InnerException:

 

Thank you very much in advance for a quick response.

 

Edmundo Guerrero

 

Parents
No Data
Reply
  • 469350
    Offline posted

    I think the problem might be your project references.

    eaguerrero said:
    • 10. infragistics2.documents.excel.v11.1
    • 11. infragistics2.win.ultrawingrid.excelexport.v11.1

    Is this a complete list of your project references? I assume it's not, since you did not list the UltraWinGrid assembly. But even so, you should be using Infragistics3 for the Excel references, not Infragistics2

    Here's the bare minimum you should be using:

    • Infragistics2.Shared.v11.1
    • Infragistics2.Win.UltraWinGrid.v11.1
    • Infragistics2.Win.v11.1
    • Infragistics3.Documents.Excel.v11.1
    • Infragistics3.Win.UltraWinGrid.ExcelExport.v11.1

     

Children