by
Mado
• Valued Contributor II
- 4568 Views
- 0 replies
- 4 kudos
Hi,I want to read an Excel "xlsx" file. The excel file has several sheets and multi-row header. The original file format was "xlsm" and I changed the extension to "xlsx". I try the following code:filepath_xlsx = "dbfs:/FileStore/Sample_Excel/data.xl...
- 4568 Views
- 0 replies
- 4 kudos
by
Mado
• Valued Contributor II
- 11551 Views
- 4 replies
- 17 kudos
Hi, I want to read an Excel file by:filepath_xlsx = "dbfs:/FileStore/data.xlsx"
sampleDF = (spark.read.format("com.crealytics.spark.excel")
.option("Header", "true")
.option("inferSchema", "false")
.option("treatEmptyValuesAsNulls", ...
- 11551 Views
- 4 replies
- 17 kudos
Latest Reply
Mado
Valued Contributor II
For this dataset, I also tried binary file reading as below: xldf_xlsx = (
spark.read.format("binaryFile")
.option("pathGlobFilter", "*.xls*")
.load(filepath_xlsx)
)
excel_content = xldf_xlsx.head(1)[0].content
file_like_obj = io.BytesIO(excel...
3 More Replies