excelapache-sparkapache-spark-sqlspark-excel

Spark : skip top rows with spark-excel


I have an excel file with damaged rows on the top (3 first rows) which needs to be skipped, I'm using spark-excel library to read the excel file, on their github there no such functionality, so is there a way to achieve this?

This my code:

Dataset<Row> ds = session.read().format("com.crealytics.spark.excel")
                                .option("location", filePath)
                                .option("sheetName", "Feuil1")
                                .option("useHeader", "true")
                                .option("delimiter", "|")
                                .option("treatEmptyValuesAsNulls", "true")
                                .option("inferSchema", "true")
                                .option("addColorColumns", "false")
                                .load(filePath);

Solution

  • This issue is fixed with spark excel 0.9.16, issue link in github