title: xlswrite many cell arrays into Excel as seperate named sheets
body: <p>I have many cell arrays like </p>
  
  <pre><code>set1 = {'year' 'date' 'day'     'time'; 
          '2017' '0803' 'Monday'  '15.15'; 
          '2015' '0303' 'Tuesday' '08.20'} 
  
  set2 = {'year' 'date' 'day'    'time'; 
          '2016' '0705' 'Friday' '17.15'; 
          '2013' '0310' 'Monday' '18.20'}
  
  title = {'dataset1' 'dataset2'}
  </code></pre>
  
  <p>The cell arrays that I have are much longer (400-1000 rows) and I have about 20 different sets, but the number changes dependent on my GUI data. What I want to do is automatically export all of these arrays into a single Excel spreadsheet, with each set as a separate sheet with the sheet name specified in the "title" string. </p>
  
  <p>So far I am using</p>
  
  <pre><code>[FileNameBodeWrite, PathNameBodeWrite] = uiputfile({'*.xls'},'Save As...', ...
                                                     [Title{1,1} '.xls']);
  xlswrite([PathNameBodeWrite FileNameBodeWrite ],[Set1],1,'A1') 
  </code></pre>
  
  <p>But that of course only works for one specific set. I want to include them all in one spreadsheet, potentially by using a loop but I'm not sure how to implement that?</p>