vb.net arcobjects run "table to excel" gp get error

4106
2
Jump to solution
09-29-2014 11:43 PM
LiYao
by
New Contributor III

Hello everybody,

I have successfully used vb.net arcobjects to run several geoprocessing tools, but when I ran "Table to excel", I got the following error:

System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.

   at ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(String Name, IVariantArray ipValues, ITrackCancel pTrackCancel)


My code is as follows:

Try

     Dim GP As GeoProcessor = New GeoProcessor()

     Dim parameters As IVariantArray = New VarArray

     parameters.Add("test_db.DBO.Segment")

     parameters.Add("D:\dev\SegmentExport.xls")

    

          GP.Execute("TableToExcel_conversion", parameters, Nothing)

Catch ex As Exception

          logger.Error("ExportSegmentToExcel: " + ex.ToString)

End Try


Is this caused by the code or library? Thanks for the attention.

0 Kudos
1 Solution

Accepted Solutions
ShriramBhutada1
New Contributor III

Hi Li,

Please look at the this forum discussion. This might help.

https://community.esri.com/thread/104492#388321

Regards,

Shriram B.

View solution in original post

0 Kudos
2 Replies
ShriramBhutada1
New Contributor III

Hi Li,

Please look at the this forum discussion. This might help.

https://community.esri.com/thread/104492#388321

Regards,

Shriram B.

0 Kudos
LiYao
by
New Contributor III

Hi Shriram B, yes it is useful, thanks.

0 Kudos