<?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: Specify a field type with Excel to Table in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688417#M53331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;just try the toolbox instead of running the script until you get a feel for inputs. it throws in the text incarnation of&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;'None'.&amp;nbsp; Integer fields, you have an option&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Sep 2019 22:24:18 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2019-09-05T22:24:18Z</dc:date>
    <item>
      <title>Specify a field type with Excel to Table</title>
      <link>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688408#M53322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a python script that uses the ExcelToTable_management() method. One of the fields in excel worksheet is zipcode, and in the past, at least one of the values is in the form of zip + 4 (84124-1234) so the new table zipcode field gets cast as text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I just got a new excel file for the month of August, and none of the data in the original zipcode field is zip + 4, so&amp;nbsp;&lt;SPAN&gt;ExcelToTable_management() converts them to a long int.&amp;nbsp; That's okay but my entire script is dependent on the field being text.&amp;nbsp; When I look at the spreadsheet itself, the zipcode column is in 'General' format.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I kind of doubt there is a way to convince&amp;nbsp;ExcelToTable_management() that when it reads that zipcode column to treat it as text regardless of what it reads, but I thought I'd ask none-the-less....&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 22:59:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688408#M53322</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-09-04T22:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Specify a field type with Excel to Table</title>
      <link>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688409#M53323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joe...&lt;/P&gt;&lt;P&gt;try setting the column in excel to text explicitly or try the tool in Table tools&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2018/02/12/table-tools-a-set-of-tools-for-working-with-tabular-data"&gt;/blogs/dan_patterson/2018/02/12/table-tools-a-set-of-tools-for-working-with-tabular-data&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.arcgis.com/home/item.html?id=90d9ca933e8c4b96bf341a20ae1f2514" title="http://www.arcgis.com/home/item.html?id=90d9ca933e8c4b96bf341a20ae1f2514"&gt;http://www.arcgis.com/home/item.html?id=90d9ca933e8c4b96bf341a20ae1f2514&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can check the toolbox script (excel2tbl.py) against yours.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 23:18:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688409#M53323</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-09-04T23:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Specify a field type with Excel to Table</title>
      <link>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688410#M53324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Data type in excel is&amp;nbsp;&lt;SPAN style="color: #3e3e3e; background-color: #ffffff; font-weight: 300;"&gt;based on the first 8 rows of the Excel file.&amp;nbsp; There are a few tricks you can use to slightly modify this behaviour.&amp;nbsp; &amp;nbsp;A source describing some of them:&amp;nbsp;&lt;A class="link-titled" href="https://kohera.be/blog/sql-server/excel-in-ssis-fixing-the-wrong-data-types/" title="https://kohera.be/blog/sql-server/excel-in-ssis-fixing-the-wrong-data-types/"&gt;Excel in SSIS: fixing the wrong data types - Kohera&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 14:28:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688410#M53324</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2019-09-05T14:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Specify a field type with Excel to Table</title>
      <link>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688411#M53325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A trick that I use is to put an apostrophe in&amp;nbsp;Excel's first row cell&amp;nbsp;containing the zip code that you want to be interpreted as text, ie. '12345.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 16:46:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688411#M53325</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2019-09-05T16:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Specify a field type with Excel to Table</title>
      <link>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688412#M53326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's basically what I did: in the first row of the excel worksheet I changed the value fro 84006 to 84006-1234 and put it to bed.&amp;nbsp; The problem with this whole mess is someday I'd like the script to run as scheduled task, so any manual intervention is not an option; the spreadsheet is an output of a report from a database, so I've asked the responsible party on that end to keep things as the were. (If I could get access straight to the database, this would be a non-issue, but it's got HIPAA protected data in it, and I'm considered a security breach....)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 16:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688412#M53326</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-09-05T16:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Specify a field type with Excel to Table</title>
      <link>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688413#M53327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My script checks the data type for all records, column by column... any crud in a column can rapidly turn a seemingly numeric column into text &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt; no guessing from a sample of rows&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 17:47:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688413#M53327</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-09-05T17:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Specify a field type with Excel to Table</title>
      <link>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688414#M53328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan- after downloading&amp;nbsp;your table package, I couldn't find&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;excel2tbl.py.&amp;nbsp; I didn't see it at the git site either.&amp;nbsp; Did I mess something?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 18:00:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688414#M53328</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-09-05T18:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Specify a field type with Excel to Table</title>
      <link>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688415#M53329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joe... forgot to post the updates from May … thanks for the catch... see the attached, hopefully it is the correct one&lt;/P&gt;&lt;P&gt;Unzip.&amp;nbsp; *.tbx and scripts folder are inside&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 18:30:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688415#M53329</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-09-05T18:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Specify a field type with Excel to Table</title>
      <link>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688416#M53330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got the script now.&amp;nbsp; taking a look at it : Read the excel into a np array... I'd need to specify&amp;nbsp;the dt to text for the zipcode field, correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 18:48:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688416#M53330</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-09-05T18:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Specify a field type with Excel to Table</title>
      <link>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688417#M53331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;just try the toolbox instead of running the script until you get a feel for inputs. it throws in the text incarnation of&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;'None'.&amp;nbsp; Integer fields, you have an option&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 22:24:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specify-a-field-type-with-excel-to-table/m-p/688417#M53331</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-09-05T22:24:18Z</dc:date>
    </item>
  </channel>
</rss>

