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
 
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.