title: How to read all the rows from an XLS file when sheet/section name is not provided in Go
body: <p>I need to read all the rows from <code>.xsl</code> files in Go. Found this amazing <a href="https://github.com/360EntSecGroup-Skylar/excelize" rel="nofollow noreferrer">Excelize library</a> that would let me read from &amp; write to XLSX/XLSM/XLTM files.</p>
  <p>Unfortunately their <a href="https://github.com/360EntSecGroup-Skylar/excelize/blob/820a314cfbcaa4d32401b0b6c67bf65f064483ec/rows.go#L24" rel="nofollow noreferrer"><code>GetRows()</code></a> requires <strong>worksheet name</strong>.</p>
  <pre><code>// Get all the rows in the Sheet1.
  rows, err := f.GetRows(&quot;Sheet1&quot;)
  for _, row := range rows {
      for _, colCell := range row {
          fmt.Print(colCell, &quot;\t&quot;)
      }
      fmt.Println()
  }
  </code></pre>
  <p>In my case, each file will have differently named worksheet. So is there a way to just get all the rows of the  <strong>defaulted/first worksheet</strong>? Thanks a lot in advance!</p>