title: Read excel files with apache spark
body: <p><em>(new to apache spark)</em></p>
  <p>I tried to create a small Scala Spark app which read excel files and insert data into database, but I have some errors which are occured due of different library versions (I think).</p>
  <pre><code>Scala v2.12 
  Spark v3.0 
  Spark-Excel v0.13.1
  </code></pre>
  <p>Maven configuration is:</p>
  <pre><code>    &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
                  &lt;artifactId&gt;spark-core_2.12&lt;/artifactId&gt;
                  &lt;version&gt;3.0.0&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
                  &lt;artifactId&gt;spark-sql_2.12&lt;/artifactId&gt;
                  &lt;version&gt;3.0.0&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;!-- https://mvnrepository.com/artifact/com.crealytics/spark-excel --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.crealytics&lt;/groupId&gt;
                  &lt;artifactId&gt;spark-excel_2.12&lt;/artifactId&gt;
                  &lt;version&gt;0.13.1&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
                  &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
                  &lt;version&gt;2.11.1&lt;/version&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
  </code></pre>
  <p>Main.scala</p>
  <pre><code>        val spark = SparkSession
              .builder
              .appName(&quot;SparkApp&quot;)
              .master(&quot;local[*]&quot;)
              .config(&quot;spark.sql.warehouse.dir&quot;, &quot;file:///C:/temp&quot;) // Necessary to work around a Windows bug in Spark 2.0.0; omit if you're not on Windows.
          .getOrCreate()
   
          val path = &quot;file_path&quot;
          val excel = spark.read
            .format(&quot;com.crealytics.spark.excel&quot;)
            .option(&quot;useHeader&quot;, &quot;true&quot;)
            .option(&quot;treatEmptyValuesAsNulls&quot;, &quot;false&quot;)
            .option(&quot;inferSchema&quot;, &quot;false&quot;)
            .option(&quot;location&quot;, path)
            .option(&quot;addColorColumns&quot;, &quot;false&quot;)
            .load()
      
          println(s&quot;excel count is ${excel.count}&quot;)
  </code></pre>
  <p>Error is:</p>
  <pre><code>Exception in thread &quot;main&quot; scala.MatchError: Map(treatemptyvaluesasnulls -&gt; false, location -&gt; file_path, useheader -&gt; true, inferschema -&gt; false, addcolorcolumns -&gt; false) (of class org.apache.spark.sql.catalyst.util.CaseInsensitiveMap) 
      at com.crealytics.spark.excel.WorkbookReader$.apply(WorkbookReader.scala:38) 
      at com.crealytics.spark.excel.DefaultSource.createRelation(DefaultSource.scala:28) 
      at com.crealytics.spark.excel.DefaultSource.createRelation(DefaultSource.scala:18) 
      at com.crealytics.spark.excel.DefaultSource.createRelation(DefaultSource.scala:12) 
      at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:339) 
      at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:279) 
      at org.apache.spark.sql.DataFrameReader.$anonfun$load$2(DataFrameReader.scala:268) 
      at scala.Option.getOrElse(Option.scala:189)     at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:268) 
      at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:203) 
      at main.scala.Main$.main(Main.scala:42) 
      at main.scala.Main.main(Main.scala)
  </code></pre>
  <p>This happening only when I try to read excel files because I use spark-excel library. Csv or tsv works fine.</p>