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
 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group