0

used the following below function but still getting match error

def readExcel(file: String): DataFrame = sqlContext.read
    .format("com.crealytics.spark.excel")
    .option("location", file)
    .option("useHeader", "true")
    .option("treatEmptyValuesAsNulls", "true")
    .option("inferSchema", "true")
    .option("addColorColumns", "False")
    .load()

val data = readExcel("path to your excel file")
data.show(false)

I am expecting to create a dataframe from xlsx file in spark scala

jarlh
  • 42,561
  • 8
  • 45
  • 63

0 Answers0