<?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: how to add the background color to excel sheet by python in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-add-the-background-color-to-excel-sheet-by-python/m-p/11570#M6518</link>
    <description>&lt;P&gt;Separate dataframe for every sheet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;with pd.ExcelWriter('output.xlsx') as writer:  
&amp;nbsp;
     df1.to_excel(writer, sheet_name='Sheet_name_1')
     df2.to_excel(writer, sheet_name='Sheet_name_2')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;For width, but I never used that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df.style.set_properties(subset=['column'], **{'width': '300px'})&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jan 2023 17:02:56 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2023-01-17T17:02:56Z</dc:date>
    <item>
      <title>how to add the background color to excel sheet by python</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-add-the-background-color-to-excel-sheet-by-python/m-p/11567#M6515</link>
      <description>&lt;P&gt;i just want to add color to excel sheet by python to specific cells, and i done that, but i need to exclude the header column, then if i tried the same method to other sheet it doesn't worked.​&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;but that bg color addition is reflected in one sheet but the same method of code is not able to use to other sheet &lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt; i​ just want to add color based on cell address.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 11:32:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-add-the-background-color-to-excel-sheet-by-python/m-p/11567#M6515</guid>
      <dc:creator>databicky</dc:creator>
      <dc:date>2023-01-17T11:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to add the background color to excel sheet by python</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-add-the-background-color-to-excel-sheet-by-python/m-p/11568#M6516</link>
      <description>&lt;UL&gt;&lt;LI&gt;Convert your dataframe to pandas on spark&lt;/LI&gt;&lt;LI&gt;color cells using style property &lt;A href="https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/api/pyspark.pandas.DataFrame.style.html" target="test_blank"&gt;https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/api/pyspark.pandas.DataFrame.style.html&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;export to excel using pandas to_excel &lt;A href="https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/api/pyspark.pandas.DataFrame.to_excel.html" target="test_blank"&gt;https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/api/pyspark.pandas.DataFrame.to_excel.html&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 17 Jan 2023 12:00:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-add-the-background-color-to-excel-sheet-by-python/m-p/11568#M6516</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2023-01-17T12:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to add the background color to excel sheet by python</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-add-the-background-color-to-excel-sheet-by-python/m-p/11569#M6517</link>
      <description>&lt;P&gt;from the pandas df i added the below color, but based on the same method i am not able to add bg in other sheets. it is not reflecting those things&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;And how can we extend the width size of the particular column in excel by python?​&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 16:38:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-add-the-background-color-to-excel-sheet-by-python/m-p/11569#M6517</guid>
      <dc:creator>databicky</dc:creator>
      <dc:date>2023-01-17T16:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to add the background color to excel sheet by python</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-add-the-background-color-to-excel-sheet-by-python/m-p/11570#M6518</link>
      <description>&lt;P&gt;Separate dataframe for every sheet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;with pd.ExcelWriter('output.xlsx') as writer:  
&amp;nbsp;
     df1.to_excel(writer, sheet_name='Sheet_name_1')
     df2.to_excel(writer, sheet_name='Sheet_name_2')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;For width, but I never used that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df.style.set_properties(subset=['column'], **{'width': '300px'})&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 17:02:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-add-the-background-color-to-excel-sheet-by-python/m-p/11570#M6518</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2023-01-17T17:02:56Z</dc:date>
    </item>
  </channel>
</rss>

