title: Dynamically create excel files from nested dictionaries consisting of dataframes
body: <p>I have a nested dictionary consisting of countries, and each country consisting of technologies and their values in a form of dataframes. Something like this:</p>
  <pre><code>dict_all_files: { 'Country1': {'technology1: dataframe, 'technology2: dataframe, 'technology3: dataframe},
                  { 'Country2': {'technology1: dataframe, 'technology2: dataframe, 'technology3: dataframe},
                  ...
                  { 'Country20': {'technology1: dataframe, 'technology2: dataframe, 'technology3: dataframe},
  </code></pre>
  <p>I want to dynamically create excel files based on the names of each country and todays date. I have tried this:</p>
  <pre><code>today = datetime.today().strftime(&quot;%d-%m-%Y&quot;)
  
  for country, techs in dict_all_files.items():
      for technology, dataframe in techs.items():
          with pd.ExcelWriter(f&quot;my_path\my_excel_{country}_{today}.xlsx&quot;) as writer: 
                  dataframe.to_excel(writer, sheet_name=technology)
  </code></pre>
  <p>This code returns the correct filenames, but each file only has one sheet, and that sheet has the name of the last technology in the dictionaries. How can I improve this so that each file has multiple sheets with the name of each technology and the corresponding data?</p>