Hi, My Name is Edmundo Guerrero
I am working with the following tools:
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.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
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:
hi Mike
I do have the correct references (just checked). Any ideas?