<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to read excel files inside a databricks notebook? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-read-excel-files-inside-a-databricks-notebook/m-p/111299#M43846</link>
    <description>&lt;P&gt;amazing, yes that's is totally what I need! Thx Stefan!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2025 18:40:40 GMT</pubDate>
    <dc:creator>jeremy98</dc:creator>
    <dc:date>2025-02-26T18:40:40Z</dc:date>
    <item>
      <title>how to read excel files inside a databricks notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-excel-files-inside-a-databricks-notebook/m-p/111141#M43806</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;Is it possible to read excel files from dbfs using a notebook file inside Databricks? If yes, how to do it?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 15:20:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-excel-files-inside-a-databricks-notebook/m-p/111141#M43806</guid>
      <dc:creator>jeremy98</dc:creator>
      <dc:date>2025-02-25T15:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to read excel files inside a databricks notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-excel-files-inside-a-databricks-notebook/m-p/111143#M43808</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/133094"&gt;@jeremy98&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Have a look here, how to read excel files:&amp;nbsp;&lt;A href="https://community.databricks.com/t5/data-engineering/how-to-insert-from-an-excel-row-cell-level-data-into-a/m-p/101823#M40850" target="_blank"&gt;https://community.databricks.com/t5/data-engineering/how-to-insert-from-an-excel-row-cell-level-data-into-a/m-p/101823#M40850&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 16:05:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-excel-files-inside-a-databricks-notebook/m-p/111143#M43808</guid>
      <dc:creator>Stefan-Koch</dc:creator>
      <dc:date>2025-02-25T16:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to read excel files inside a databricks notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-excel-files-inside-a-databricks-notebook/m-p/111151#M43811</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks for your answer, but the point is that the file location is based on dbfs and seems that using a serveless compute and executing the pandas api is not possible to look at dbfs&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 17:16:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-excel-files-inside-a-databricks-notebook/m-p/111151#M43811</guid>
      <dc:creator>jeremy98</dc:creator>
      <dc:date>2025-02-25T17:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to read excel files inside a databricks notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-excel-files-inside-a-databricks-notebook/m-p/111229#M43825</link>
      <description>&lt;P&gt;In general, you shouldn't use dbfs any more, instead, use Volumes.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;But, as example, if I have an excel in my Worskpace directory, you could do this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StefanKoch_0-1740548788545.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/15091iD34C2AA06FADA27A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StefanKoch_0-1740548788545.png" alt="StefanKoch_0-1740548788545.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%pip install openpyxl
import pandas as pd

# replace with your path
file_path = "/Workspace/Users/stefan.koch@btelligent.com/excel/FinancialsSampleData.xlsx"

# read the sheet with Name Financials1 into a pandas dataframe
pdf = pd.read_excel(file_path, sheet_name="Financials1")

# Transform the Pandas Dataframe to a Pyspark Dataframe
df = spark.createDataFrame(pdf)

display(df)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StefanKoch_1-1740548840108.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/15092i09518C1B1564A555/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StefanKoch_1-1740548840108.png" alt="StefanKoch_1-1740548840108.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Would this work for you or what is your dbfs path?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 05:47:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-excel-files-inside-a-databricks-notebook/m-p/111229#M43825</guid>
      <dc:creator>Stefan-Koch</dc:creator>
      <dc:date>2025-02-26T05:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to read excel files inside a databricks notebook?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-read-excel-files-inside-a-databricks-notebook/m-p/111299#M43846</link>
      <description>&lt;P&gt;amazing, yes that's is totally what I need! Thx Stefan!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 18:40:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-read-excel-files-inside-a-databricks-notebook/m-p/111299#M43846</guid>
      <dc:creator>jeremy98</dc:creator>
      <dc:date>2025-02-26T18:40:40Z</dc:date>
    </item>
  </channel>
</rss>

