AnsweredAssumed Answered

Arcpy: get user's input for location and file name

Question asked by helenchu on Aug 31, 2018
Latest reply on Aug 31, 2018 by helenchu

Hi

I have arcpy scripts to run in arcmap. Last step is "Table to Excel Conversion"

Instead of having the excel file name and location hard-coded I'd like to get the user's input for those. 

Your help is greatly appreciated!

 

 

# sftMap.py
# Created on: 2018-08-31 10:42:32.00000
# (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy
arcpy.env.overwriteOutput = True


# Local variables:
SiteNum_AcreCal = "C:\\...\\scratch\\parcel_Select_SpatialJoin_TableToExcel.xls"
parcel_Select_SpatialJoin_Ta_xls = "C:\\...\\ArcGIS\\parcel_Select_SpatialJoin_Ta.xls"

 

 

 

# Process: Table To Excel
arcpy.TableToExcel_conversion(ParcelSiteNum, SiteNum_AcreCal, "NAME", "CODE")

Outcomes