1

I am trying to read the one excel file in spark. I am using crealytics library for this.

But my code is getting failed as one of the column is referring sheet to populate its value through VLOOKUP formula.

I have been trying with "crealytics" library but no luck.

val df = spark.read.format("com.crealytics.spark.excel")
        .option("sheetName", "Final_Output")
        .option("useHeader", "true")
        .option("treatEmptyValuesAsNulls", "false")
        .option("inferSchema", "false")
        .option("addColorColumns", "false")
        .option("location", input_path)
        .load()

df.show(5, false)

java.lang.RuntimeException: Unknown cell type 2 for VLOOKUP.

baitmbarek
  • 2,440
  • 4
  • 18
  • 26
Anand Jha
  • 11
  • 4
  • Your exception is not coming due to calculated columns. Spark does not distinguish between calculated columns and normal columns. – venus Nov 05 '19 at 17:14
  • One more thing I would like to mention- use have defined 'inferSchema' as false and you are not providing any schema explicitly. – venus Nov 05 '19 at 17:23
  • 1
    there is very nice example available on https://github.com/crealytics/spark-excel. – venus Nov 05 '19 at 17:25

0 Answers0