title: Skip rows while reading multiple excel worksheets in R
body: <p>I am using <strong>readxl</strong> library to read many excel worksheets in the same excel workbook (called <strong>data.xlsx</strong>) with the following format:</p>
  
  <p>Data starts in row 3. </p>
  
  <pre><code>  row1
    row2
   companyName   1980    1981    1982 ... 2016
   company1       5       6       7        8
   company2       10      20      30       40
   company3       20      40      60       80
   ....
  </code></pre>
  
  <p>The data range is different in length by each row and column. However, they have the <strong>companyName</strong> as common key. The <strong>year</strong> range varies from starting from 1980 or 1990 until 2016. The <strong>worksheet name</strong> is the <strong>data name</strong>.</p>
  
  <p>I want to create a single excel where all data are extracted from all worksheets.</p>
  
  <pre><code> companyName   Year   dataname     values
   company1      1980   sheetname1     5
   company1      1981   sheetname1     6
   company1      1982   sheetname1     7
   company1      ...    sheetname1     ...
   company1      2016   sheetname1     8
   company2      1980   sheetname1     10
   company2      1981   sheetname1     20
   company2      1982   sheetname1     30
   company2      ...    sheetname1     ...
   company2      2016   sheetname1     40
   ....          ....     ...           ...
   company1      2000    sheetname2     xxx
   company1      2001    sheetname2     yyy
    etc
    etc
    etc
  </code></pre>
  
  <p>This is how far I managed to get too:</p>
  
  <pre><code>  library(tidyverse)
    library(readxl)
    library(data.table)
  
     #read excel file (from [here][1])
     file.list&lt;-"data.xlsx"
  
       **#read all sheets (and **skip** first two rows)**
  
     df.list &lt;- lapply(file.list,function(x) {
       sheets &lt;- excel_sheets(x)
       dfs &lt;- lapply(sheets, function(y) {
         read_excel(x, sheet = y,skip=2)
         })
       names(dfs) &lt;- sheets
       dfs
     })
  </code></pre>
  
  <p>I have following issues:</p>
  
  <ul>
  <li>the first two rows are not been skipped</li>
  <li>how I create one dataframe with only select sheets only (ie. sheet 5, sheet 10 and sheet 15).</li>
  </ul>
  
  <p>Thank you for your help.</p>
  
  <p>Source:
  <a href="https://stackoverflow.com/questions/42115412/r-reading-multiple-excel-files-extract-first-sheet-names-and-create-new-colum">R: reading multiple excel files, extract first sheet names, and create new column</a> </p>