Hi there,
I'm a little confused. I thought, that arcpy has the same functionality, no matter where it is used - except from differences due to licensing-levels (Basic/Standard/Advanced). I just found out, that the arcpy-function "TableToExcel_conversion" does not support exporting to xlsx, only xls on our ArcGIS Server. Searching for this in the documentation, I found out, that in ArcMap, only xls is supported, but with ArcGIS Pro, xlsx as well. But what about ArcGIS Enterprise? I run a geoprocessing service on our ArcGIS Server (10.7).
Any ideas? I feel like I'm having a mental blank ...
Solved! Go to Solution.
Yes, the ArcMap docs for 10.7 should correlate to ArcGIS Server 10.7.
According to the Enterprise docs, Python 3 was available on Linux at 10.5, and this blog indicates that all of Server has Python 3 support (I haven't used this functionality).
- V
No, ArcPy is different between the Python 2.7 and Python 3 releases. ArcGIS Pro (Python 3) is the focus of new development, so it has more functionality than the ArcMap/ArcCatalog/ArcGIS Server (Python 2.7) flavor (besides the new Pro-specific mapping interfaces). The Pro release also bundles the ArcGIS API for Python, which provides easier access to some AGOL/Portal functionality (Enterprise).
Okay, so the documentation on toolsets in ArcMap (e.g. https://desktop.arcgis.com/en/arcmap/10.7/tools/conversion-toolbox/table-to-excel.htm) is valid for ArcGIS Server as well?
Will ArcGIS Server get Python 3 support as well and where can I find information about that?
Yes, the ArcMap docs for 10.7 should correlate to ArcGIS Server 10.7.
According to the Enterprise docs, Python 3 was available on Linux at 10.5, and this blog indicates that all of Server has Python 3 support (I haven't used this functionality).
- V
Awesome, thank you very much!
ArcGIS Server deployments have come with both Python 2.7 and Python 3 for several releases, possibly back to 10.5.x. The 2 deployments are simply in different places.
The following is from a 10.7.1 install (note the OUTPUTS):
(arcgispro-py3) E:\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3>python
Python 3.6.8 |Anaconda, Inc.| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import arcpy
>>>
>>> help(arcpy.conversion.TableToExcel)
Help on function TableToExcel in module arcpy.conversion:
TableToExcel(Input_Table=None, Output_Excel_File=None, Use_field_alias_as_column
_header=None, Use_domain_and_subtype_description=None)
TableToExcel_conversion(Input_Table, Output_Excel_File, {Use_field_alias_as_
column_header}, {Use_domain_and_subtype_description})
Converts a table to a Microsoft Excel file (.xls or .xlsx).
INPUTS:
Input_Table (Table View):
The table to be converted to Microsoft Excel.
Use_field_alias_as_column_header {Boolean}:
Specifies how column names in the output are determined.
* NAME-Column headers will be set using the input's field names. This
is the default.
* ALIAS-Column headers will be set using the input geodatabase table's
field aliases. If the input is a layer in a map, the value set on the
layer's field alias is ignored.
Use_domain_and_subtype_description {Boolean}:
Controls how values from subtype fields or fields with a coded value
domain are transferred to the output.
* CODE-All field values will be used as they are stored in the table.
This is the default.
* DESCRIPTION-For subtype fields, the subtype description will be
used. For fields with a coded value domain, the coded value
descriptions will be used.
OUTPUTS:
Output_Excel_File (File):
The output Excel file. Specify the format of the Excel file using an
.xls or .xlsx file extension.
>>>