<?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: Add header to csv file  in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316723#M24619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed to that...but when using the below it writes header values to the 1st and 2nd line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: I have 78 fields. &amp;nbsp;The header line below is just showing 3. &amp;nbsp;Might be hitting a limit in Excel from a CSV file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;headers = ["region_1,county_1,ramp_1,date,"]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Nov 2016 20:22:26 GMT</pubDate>
    <dc:creator>jaykapalczynski</dc:creator>
    <dc:date>2016-11-22T20:22:26Z</dc:date>
    <item>
      <title>Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316718#M24614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a csv file via the SearchCursor. &amp;nbsp;This Works great....although I am not getting the field names in there. &amp;nbsp;I went about this 2 ways. &amp;nbsp;I have tried a ton of forums but just cant seem to get the right syntax to create this ONLY once and when I bring it into Excel it has a header for each field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I add the headers IN the "for row in cursor"&lt;/P&gt;&lt;P&gt;This adds them BUT it creates a set of headers for each record imported&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;var_region_1 &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;var_county_1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;var_ramp_1&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; where_clause&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;expression&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zval &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'{0},{1},{2}'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; headers &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'region_1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'county_1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'ramp_1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'\t'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;headers&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'\n'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;zval &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"%s\n"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add headers BEFORE the "for row in cursor"&lt;/P&gt;&lt;P&gt;This adds them but when I bring into excel they are all crammed into the first box, not spread out for each field.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;headers &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'region_1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'county_1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'ramp_1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
outFile&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'\t'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;headers&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'\n'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;var_region_1 &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;var_county_1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;var_ramp_1&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; where_clause&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;expression&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zval &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'{0},{1},{2}'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;zval &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"%s\n"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:03:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316718#M24614</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2021-12-11T15:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316719#M24615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are creating a CSV, which is comma delimited, but you are inserting tabs between your headers, so they are all getting treated as a header for a single field/column.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 19:51:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316719#M24615</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-11-22T19:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316720#M24616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it...answered my own question! &amp;nbsp;Just added , inside the quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;headers &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'region_1,'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'county_1,'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'ramp_1,'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 19:52:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316720#M24616</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2016-11-22T19:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316721#M24617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have one last issue. &amp;nbsp;I have many many fields...when I write the header in it writes to the second line when I bring the csv into excel.&lt;/P&gt;&lt;P&gt;BUT the data that I am writing to the same csv file does not. &amp;nbsp;The individual records are all on the same line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is this? &amp;nbsp;Can I specify to not return to the 2nd line ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 20:07:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316721#M24617</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2016-11-22T20:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316722#M24618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although that works, it isn't very Pythonic.&amp;nbsp; Your original code can be modified slightly to make it work with existing header format:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;outFile&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;','&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;headers&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'\n'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 20:08:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316722#M24618</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-11-22T20:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316723#M24619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed to that...but when using the below it writes header values to the 1st and 2nd line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: I have 78 fields. &amp;nbsp;The header line below is just showing 3. &amp;nbsp;Might be hitting a limit in Excel from a CSV file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;headers = ["region_1,county_1,ramp_1,date,"]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 20:22:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316723#M24619</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2016-11-22T20:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316724#M24620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does this produce, using either 3 or 78? (Note, commas outside of strings)&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;headers = ['region_1', 'county_1', 'ramp_1']
outFile.write(','.join(headers) + '\n')&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:03:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316724#M24620</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T15:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316725#M24621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When i use 3 it places them in the correct location.&lt;/P&gt;&lt;P&gt;When I use all 78 it gets to a point it cuts off the text between the ' ' &amp;nbsp;&lt;/P&gt;&lt;P&gt;It then throws the rest of what go cut off&amp;nbsp;to the next line and then all the others that follow are placed in the proper locations albeit in the 2nd row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears that I am hitting some sort of character limit in the CSV as it returns to the next line for the header....too many characters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached csv and excel file outputs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 20:38:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316725#M24621</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2016-11-22T20:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316726#M24622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I am running into this issue....researching now...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.tectite.com/vbforums/showthread.php?601-Maximum-length-of-CSV-file" title="https://www.tectite.com/vbforums/showthread.php?601-Maximum-length-of-CSV-file"&gt;Maximum length of CSV file&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 20:51:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316726#M24622</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2016-11-22T20:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316727#M24623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I open the CSV, everything looks fine.&amp;nbsp; When I open the CSV directly in Excel, it displays fine.&amp;nbsp; When I open your XLS, I see your issue.&amp;nbsp; What version of Excel are you using?&amp;nbsp; I am looking at the CSV using Excel 2013?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 20:52:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316727#M24623</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-11-22T20:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316728#M24624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excel 2010...&lt;/P&gt;&lt;P&gt;Yea something weird is going on...If I copy the created .csv file from my server to my PC, then go File&amp;gt;open (not drag and drop it woks fine). &amp;nbsp;Drag and drop it carries to the next line. &amp;nbsp;But that only works once....then it gets all screwed up again...Very puzzled...going to try and decrease the characters being used in the header to see if that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 20:56:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316728#M24624</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2016-11-22T20:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Add header to csv file</title>
      <link>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316729#M24625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I stripped down a bunch of characters from the Header...it appears to be working now...definitely think I was hitting some sort of Character limit...I thank you very much for you help...spent way to long on this already...seems to be working...just watch how many characters I have from now on....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 21:03:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-header-to-csv-file/m-p/316729#M24625</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2016-11-22T21:03:04Z</dc:date>
    </item>
  </channel>
</rss>

