cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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
 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now