Код: Выделить всё
String filePath = "file:///Users/myuser/example-data.xlsx";
Dataset dataset = spark.read()
.format("com.crealytics.spark.excel")
.option("header", "true")
.option("inferSchema", "true")
.option("dataAddress", "'ExampleData'!A2:D7")
.load(filePath);
Код: Выделить всё
// dataset will be empty
.option("dataAddress", "'ExampleData'!A:D")
Код: Выделить всё
// dataset will be empty
.option("sheetName", "ExampleData")
.option("dataAddress", "A:D")
Код: Выделить всё
// dataset will be empty; and I have experimented by setting it to 0 as well
// in case it is a 0-based index
.option("sheetIndex", 1)
.option("dataAddress", "A:D")
Подробнее здесь: https://stackoverflow.com/questions/794 ... ddress-ran