title: Create list of files in directory, apply (lapply) a custom function to each, and cbind results to new file
body: <p>rewrote in attempt to simplify my problem statement.</p>
  <p>I am using R V1.3.959 and relatively new to R overall. I have a custom excel form, which means the objects are in various cells in excel and the variable is also in some cell.  I have over 1000 of these forms as product specs.  I read in only 1 file and created a function called tidy.form to pull data out and then cbind into new file as below.</p>
  <pre><code>read_customer_file = &quot;C:/Users/..../FABRIC TECHNICAL SUBMISSION AGREEMENT J123abd.xlsx&quot;
  
  product_tech &lt;- read_excel(read_customer_file, sheet = &quot;Form&quot;) %&gt;% clean_names()
  
  #function for make form tidy
  form.extract &lt;- function(tidy.form) {
    
  #extract the object / data point looking for but with entire column
  fabric.supplier.name &lt;- product_tech[c( 0,5)]
  #extract the specific row in the column with the data point desired
  fabric.supplier.name &lt;- slice(fabric.supplier.name, 3,0)
  #rename column to correct variable
  colnames(fabric.supplier.name)[colnames(fabric.supplier.name) == &quot;x5&quot;] &lt;- &quot;fabric.supplier.name&quot;
  
  combine &lt;- cbind(date, fabric.supplier.name, address)
  return(combine)
  }
  </code></pre>
  <p>Now I need a way to read in all of the xlsx files from a directory and do the same thing for each.</p>
  <p>I figured out how to read the file names in through:</p>
  <pre><code>files &lt;- list.files(path=&quot;C:/Users/me/productspecfolder&quot;, pattern=&quot;*.xlsx&quot;, full.names=TRUE, recursive=FALSE)
  </code></pre>
  <p>However I am stuck at how to loop / lapply through my list.files and apply the function tidy.form to each.</p>
  <p>Any help would be so much appreciated!</p>