User (Old forums)MemberJune 4, 2008 at 4:18 pmPost count: 23064
I’m having an issue Exporting the data from a Datagrid into XML format all I’ve done is implement the three lines of code that are given in the documentation (See Below) and when the code executes I get an InvalidOperationException, the XML file is created but it’s empty.
I’m currently using VB.NET (Visual Studio 2005 Professional), Windows XP SP3, Office 2007 Xceed Grid 3.6.7614.
Any ideas to what could be happening, and any push in a direction would be much appreciated.
Dim excelExporter1 As New ExcelExporter()
Thank you in Advance
Imported from legacy forums. Posted by Brandon (had 771 views)User (Old forums)MemberJune 6, 2008 at 3:35 pmPost count: 23064
Honestly, this works fine here, so it is hard to tell what can be wrong. Can you post the complete exception message and stack trace, in case we can point to something?
Imported from legacy forums. Posted by André (had 312 views)User (Old forums)MemberJune 17, 2008 at 2:13 pmPost count: 23064
Sorry it took a bit to get back to you, the exception detail is below
System.InvalidOperationException was unhandled
Message=”An exception occurred while exporting.”
at Xceed.Grid.Exporting.ExcelExporter.Export(DetailGrid detailGrid, Stream stream)
at Xceed.Grid.Exporting.ExcelExporter.Export(DetailGrid detailGrid, String filename)
at Xceed.Grid.Exporting.ExcelExporter.Export(GridControl gridControl, String filename)
at DuProcessAdvancedSearch.frmAdvSearch.mnFilePrint_Click(Object sender, EventArgs e) in C:\VSS_BUG\.NET\WinForms\DuProcessAdvancedSearch\DuProcessAdvancedSearch\frmAdvSearch.vb:line 229
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Imported from legacy forums. Posted by Brandon (had 504 views)User (Old forums)MemberJune 18, 2008 at 2:54 pmPost count: 23064
Is there an InnerException that would give more information as to what is wrong?
It could be a config problem, like IncludeDetailGrids set to true and DetailGridsMode set to Joined on the ExcelExporter, but SynchronizeDetailGrids set to false on the GridControl.
It could be a access permission problem on the underlying file of the stream (the “C:\test.xml” ).
It could be a bug.
Imported from legacy forums. Posted by André (had 305 views)User (Old forums)MemberJune 20, 2008 at 2:47 pmPost count: 23064
That was it…my SynchronizeDetailGrids property was set to False, thanks for your help guys I’ll make sure to take note of that issue if anyone here runs into it again. Thanks again
Imported from legacy forums. Posted by Brandon (had 1141 views)
- You must be logged in to reply to this topic.