I am using below code to read excel file using Azure databricks:
dfSource = spark \
.read \
.format("com.crealytics.spark.excel") \
.option("Header", "true") \
.option("inferSchema", "true") \
.load(sSourcePath)#.withColumn("SourceFile",F.input_file_name())
But I get the error below:
PathNotFound error message: openFileForRead must be used with files and not directories
When I give the full filename, Spark properly read the file.
Note: I want to read all the files present in the folder.