I have a GeoProcessing tool that develops a Census profile based on a user defined study area - the final output using Table to Excel.
The model operates perfectly in ArcGIS and produces the output that i require. It also publishes to Server without any errors or warnings. However, when I run the tool on ArcGIS Server I get an error saying that the .xls is <empty>.
Any ideas what could be happening here?
Image below of model and then error when I run the model
Thanks
Justin
Hm, the first thing I would try is using SetParameter instead of SetParameterAsText, (you're not really returning text after all, you'll be returning a feature class). Make sure the output parameter type is a feature class as well. Then, try to update the arcpy.SetParameter() line to return the OutTable variable instead of the name of the output data:
arcpy.DeleteField_management("ThemesIndicators_1", ["IndCode"])
OutTable = os.path.join(arcpy.env.scratchGDB,"ThemesIndicators_2")
arcpy.CopyFeatures_management(ThemesIndicators_1, OutTable)
arcpy.SetParameter(0, OutTable)
That way, you're making sure that the output of the script is pointing to the path to the data you're looking to return.