📜  spark读取excel文件-任何代码示例

📅  最后修改于: 2022-03-11 15:00:19.328000             🧑  作者: Mango

代码示例1
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"))