<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using Turtle? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/using-turtle/m-p/1209175#M59458</link>
    <description>&lt;P&gt;BTW I did not know there was a turtle module for Python, I have to check that out. Thanks for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Sep 2022 15:29:38 GMT</pubDate>
    <dc:creator>Brian_Wilson</dc:creator>
    <dc:date>2022-09-02T15:29:38Z</dc:date>
    <item>
      <title>Using Turtle?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-turtle/m-p/1208780#M59398</link>
      <description>&lt;P&gt;I've automated my workflow using Python but I have to use "replace" in the word document and then paste it into the Python terminal. Importing "Turtle" in Python pops open a dialog box in Arc that I can then input what I would use replace with.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import sys
import turtle

def get_user_input(prompt):
    if not sys.stdin:
        sc = turtle.Screen();
        sc.setup(0, 0);
        return turtle.textinput(title='', prompt=prompt);
    return input(str);

AA1 = get_user_input(prompt="Enter text here: ")

BB1 = get_user_input(prompt="Enter text here: ")

CC1 = get_user_input(prompt="Enter text here: ")

arcpy.conversion.ExcelToTable(r"AA1\BB1.xlsx", r"CC1\Table Name", "Sheet Name", 1, '')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Except when I run &lt;SPAN&gt;arcpy.conversion.ExcelToTable I end up getting an error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 17, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\conversion.py", line 514, in ExcelToTable&lt;BR /&gt;raise e&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\conversion.py", line 511, in ExcelToTable&lt;BR /&gt;retval = convertArcObjectToPythonObject(gp.ExcelToTable_conversion(*gp_fixargs((Input_Excel_File, Output_Table, Sheet, field_names_row, cell_range), True)))&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;return lambda *args: val(*gp_fixargs(args, True))&lt;BR /&gt;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Input Excel File: Dataset AA1\BB1.xlsx does not exist or is not supported&lt;BR /&gt;Failed to execute (ExcelToTable).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What am I doing wrong?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 17:11:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-turtle/m-p/1208780#M59398</guid>
      <dc:creator>Davec43</dc:creator>
      <dc:date>2022-09-01T17:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using Turtle?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-turtle/m-p/1208798#M59402</link>
      <description>&lt;P&gt;Add "import os" near the top and change line 17 to&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;xlsx = os.path.join(AA1, BB1 + '.xlsx)
tbl = os.path.join(CC1, "Table Name")
arcpy.conversion.ExcelToTable(xlsx,tbl,"Sheet Name",1,'')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 17:40:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-turtle/m-p/1208798#M59402</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2022-09-01T17:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using Turtle?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-turtle/m-p/1209174#M59457</link>
      <description>&lt;P&gt;Your version is just passing strings into the arcpy function. You need to tell the python interpreter to pass the values of the variables (AA1,BB1,CC1) to the function instead. I used the "os.path.join" function to build up complete paths for the files. You could just "add" the strings together, for example with xlsx = AA1 + "\\" + BB1 + ".xlsx" but os.path.join() will figure out all the details like what slash to put in there and if it even needs one. It's "safer".&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could also combine all three lines into one line if you want. I find breaking things out on several lines helps keep things easier to read and makes things easier to debug.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 15:28:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-turtle/m-p/1209174#M59457</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2022-09-02T15:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using Turtle?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-turtle/m-p/1209175#M59458</link>
      <description>&lt;P&gt;BTW I did not know there was a turtle module for Python, I have to check that out. Thanks for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 15:29:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-turtle/m-p/1209175#M59458</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2022-09-02T15:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using Turtle?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-turtle/m-p/1209809#M59550</link>
      <description>&lt;P&gt;Thanks for explaining why it wasn't working!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 11:54:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-turtle/m-p/1209809#M59550</guid>
      <dc:creator>Davec43</dc:creator>
      <dc:date>2022-09-06T11:54:58Z</dc:date>
    </item>
  </channel>
</rss>

