Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
hstance
Advocate I
Advocate I

Has anyone had success setting up Crealytics project in Fabric?

How do you read in data from an excel in FAbric? I use crealytics in Synapse, but it doesn't work in Fabric. Has anyone tried?

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @hstance,

You can create a notebook to use pandas package function to read data from excel: (the sample file is upload to the files folder and I copy the api path to use in the functions)

import pandas as pd 
 
# Read an Excel file from your Lakehouse into a Pandas DataFrame
# Replace LAKEHOUSE_PATH and FILENAME with your own values
df = pd.read_excel("/lakehouse/default/Files/test.xlsx") 
display(df) 

1.png

Read and write data with Pandas - Microsoft Fabric | Microsoft Learn

Regards,

Xiaoxin Sheng

View solution in original post

4 REPLIES 4
jrauj67
Frequent Visitor

Hi, 

I found a way to use Crealytics project in MS Fabric:

  1. You will need to create a lakehouse and a default environment, which will be attached to your notebook.
  2. In your local machine you need to build fat jar with all dependencies.
    1. For this purpose create a pom.xml file with this definition:
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>spark-excel-fatjar</artifactId>
  <version>1.0</version>
  <packaging>jar</packaging>

  <dependencies>
    <dependency>
      <groupId>com.crealytics</groupId>
      <artifactId>spark-excel_2.12</artifactId>
      <version>0.13.5</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.4.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals><goal>shade</goal></goals>
            <configuration>
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <!-- No relocations: keeps packages as-is -->
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
  • Download the "Binary zip archive" from https://maven.apache.org/download.cgi

  • Extract the ZIP to a directory like C:\Program Files\Apache\Maven

  • Add Maven to the System Environment Variables:

    • Go to System Properties > Environment Variables

    • Under "System variables", edit Path and add:

      C:\Program Files\Apache\Maven\bin
  • Verify it works using mvn -v and run mvn clean package

  • Upload spark-excel-fatjar-1.0 into Lakehouse/Files
  • Add spark property spark.jars with abfss jar path into the default environment (e.g. abfss://<workspace>@onelake.dfs.fabric.microsoft.com/<lakehousename>/Files/spark-excel-fatjar-1.0.jar).
  • Enjoy.

 

Anonymous
Not applicable

Hi @hstance ,

Any update on this? Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @hstance,

You can create a notebook to use pandas package function to read data from excel: (the sample file is upload to the files folder and I copy the api path to use in the functions)

import pandas as pd 
 
# Read an Excel file from your Lakehouse into a Pandas DataFrame
# Replace LAKEHOUSE_PATH and FILENAME with your own values
df = pd.read_excel("/lakehouse/default/Files/test.xlsx") 
display(df) 

1.png

Read and write data with Pandas - Microsoft Fabric | Microsoft Learn

Regards,

Xiaoxin Sheng

for some reason this doesn't work for me, I changed my lakehouse name, let's say it's called lakehouse_1. Then I use this 

 

# Read in raw data
table_path = "/lakehouse_1/Files/test.xlsx"

pd_test = pd.read_excel(table_path)

 

and failed. 

however, if I use the  ABFS path as the table path, I can read the data successful. Can you please help me with the relative path?

Helpful resources

Announcements
Fabric July 2025 Monthly Update Carousel

Fabric Monthly Update - July 2025

Check out the July 2025 Fabric update to learn about new features.

July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.