2

When creating tool from a python script in ArcGIS, data type has to be chosen in Add Script wizard and one of my parameters is Excel and another one specific sheet whereas there can be more sheets in excel. I don't know which one to choose for excel and sheet which is obtained from excel. Both excel and sheet are parameters in my script.

enter image description here

  • 5
    I think it would be a table/table view or you could use the File type and set a filter to xls;xlsx – crmackey Jan 5 '16 at 20:03
2

The excel parameter's datatype would be 'File', with a filter of "xls;xlsx" as per @crmackey comment.

The sheet parameter's datatype would be 'String'. There is no automatic behavior for populating the 'sheets' into a combobox/choice list from the 'File'. This is something you'll need to do yourself.

Fortunately this has been done, you could just copy the ExcelToTable tool in the 'Conversion Toolbox' (added at the 10.2 release) and modify it to fit your needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.