title: using variable instead of string in xlsread - why not working?
body: <p>I have a vector of filenames as strings and am trying to feed them in to <code>xlsread</code> one by one in a loop. Here's my code (sorry for the long list of fnames):</p>
  
  <pre><code>all_u_fnames={'u_results_901.xls','u_results_902.xls','u_results_903.xls','u_results_904.xls','u_results_905.xls'...
  'u_results_906.xls','u_results_907.xls','u_results_908.xls','u_results_909.xls','u_results_910.xls'...
  'u_results_911.xls','u_results_912.xls','u_results_913.xls','u_results_914.xls','u_results_915.xls'...
  'u_results_916.xls','u_results_917.xls','u_results_918.xls','u_results_919.xls','u_results_920.xls'...
  'u_results_921.xls','u_results_922.xls','u_results_923.xls','u_results_924.xls','u_results_925.xls'...
  'u_results_926.xls','u_results_927.xls','u_results_928.xls','u_results_929.xls','u_results_930.xls'};
  
  for i = 1:length(all_u_fnames)
  
  fnameU=all_u_fnames(i);
  
  u1=xlsread(fnameU,'Point_5','A:U');
  u2=xlsread(fnameU,'Point_6','A:U');
  u3=xlsread(fnameU,'Point_7','A:U');
  u4=xlsread(fnameU,'Point_8','A:U');
  </code></pre>
  
  <p>I keep getting the error <code>Filename must be a string.</code></p>
  
  <p>How is the <code>fnameU</code> that I'm inputting into xlsread not a string here?</p>
  
  <p>Thanks,
  Alex</p>