Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

spark read excel file

spark = SparkSession.builder 
.master("local") 
.appName("Word Count") 
.config("spark.jars.packages", "com.crealytics:spark-excel_2.11:0.12.2") 
.getOrCreate()

df = spark.read.format("com.crealytics.spark.excel") 
.option("useHeader", "true") 
.option("inferSchema", "true") 
.option("dataAddress", "NameOfYourExcelSheet") 
.load("your_file"))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #spark #read #excel #file
ADD COMMENT
Topic
Name
4+2 =