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:ย 

i can list out the file using dbutils but can not able to read files in databricks

MohammadWasi
New Contributor II

I can list out the file using dbutils but can not able to read files in databricks. PFB in screenshot. I can able to see the  file using dbutils.fs.ls but when i try to read this file using read_excel then it is showing me an error like "FileNotFoundError: [Errno 2] No such file or directory: '/FileStore/xxx/abcd.xls'". I used to read excel file as

"df_mem = pd.read_excel('/FileStore/xxx/abcd.xls', engine='openpyxl', sheet_name = 'Sheet 1')"

MohammadWasi_0-1715064354700.png

 

 

3 REPLIES 3

Thanks @Retired_mod for your reply, Unfortunately I used path as variable in my code but again showing same error. PFB in screenshot.

MohammadWasi_0-1715076279718.png

 

MohammadWasi
New Contributor II

I am using '.xls' format only. 

MohammadWasi
New Contributor II

Hi @Retired_mod I changed file in .xlsx format but again got the same error as above.

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