Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2022 07:00 AM
First of all check your spark and scala version.
Then install the library with Maven coordinates according to your spark and scala version.
Check further on this link to know more about the Maven coordinates to use:
https://mvnrepository.com/artifact/com.crealytics/spark-excel_2.12
Selected Cluster --> Libraries --> Install New --> Maven -->
Coordinates- com.crealytics:spark-excel_2.12:3.2.1_0.16.4
For pyspark use the following code:
df2 = spark.read.format("com.crealytics.spark.excel").option("header", "true").option("inferSchema", "true").load("dbfs:/FileStore/shared_uploads/abc@gmail.com/book.xlsx")
display(df2)