cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How to import excel files xls/xlsx file into Databricks python notebook?

srjchoubey2
New Contributor

Method 1: Using "com.crealytics.spark.excel" package, how do I import the package?

Method 2: Using pandas I tried the possible paths, but file not found it shows, nor while uploading the xls/xlsx file it shows options for importing the dataframe.

Help is appreciated
Thanks

 

 

 

 

 

1 REPLY 1

vishwanath_1
New Contributor III
import pandas as pd
 
ExcelData = pd.read_excel("/dbfs"+FilePath, sheetName) #  make sure you add /dbfs to FilePath