Business-critical data often lives in Excel workbooks and SharePoint Lists managed by people who've never heard of a primary key. This lesson shows you how to connect those sources to a Fabric Lakehouse using Dataflow Gen2, apply Power Query transformations to clean and shape the data, and write the results to refreshable Delta tables your entire data platform can rely on.

Here's a situation every data engineer eventually faces: your company's core transactional data lives in a proper database, but a significant chunk of the actual business logic — price overrides, regional territory mappings, product launch dates, exception lists — lives in Excel workbooks on SharePoint, maintained by people who have never heard of a primary key and are very proud of their color-coded rows.
Ignoring these sources isn't an option. They influence real decisions, and if your data model doesn't include them, your reports will be wrong in ways that are hard to explain and embarrassing to discover in a meeting. The challenge is bridging the gap: getting data that business users own and update into a governed, queryable format that your lakehouse can serve reliably.
That's exactly what this lesson solves. By the end, you'll know how to use Dataflow Gen2 in Microsoft Fabric to connect to Excel files stored on SharePoint, pull in SharePoint List data, apply meaningful transformations with Power Query, and write the results to Delta tables in a Fabric Lakehouse — giving you a repeatable, refreshable pipeline that keeps pace with the business without requiring anyone to send you a CSV attachment.
What you'll learn:
Before starting this lesson, you should have:
Before diving into the mechanics, let's establish why this matters architecturally.
In a typical organization, the data you get from databases and APIs represents what happened. But business users often control how to interpret what happened. A sales operations manager maintains an Excel sheet that maps sales rep IDs to territories. A finance analyst owns a workbook with approved budget allocations by cost center. A product manager runs a SharePoint List tracking which SKUs are active, discontinued, or under review.
These aren't throw-away files. They're business reference data — the kind of data that determines whether your revenue figures are sliced correctly, whether your headcount analysis is grouped by the right department hierarchy, and whether your inventory reports flag the right products.
The traditional approach is to email someone for the latest file, manually drop it in a folder, and run a script. That's brittle. With Dataflow Gen2, you can connect directly to the live source, apply transformations, and write to a Delta table on a schedule. When the business user updates their spreadsheet, the next refresh picks it up automatically.
Key insight
Delta tables in OneLake aren't just storage — they're versioned, transactional, and directly queryable by Power BI via Direct Lake mode. When you write your Excel or SharePoint data to a Delta table, you're not just landing a file; you're making it a first-class citizen of your data platform. Learn more about why that matters in OneLake Explained: One Copy of Data, Delta Tables, and Shortcuts.
Let's map out what we're building so the individual steps make sense.
The source side: An Excel workbook (.xlsx) uploaded to a SharePoint document library, and a SharePoint List used to track product status. Both live on a SharePoint Online site.
The transformation layer: Dataflow Gen2, which uses Power Query as its transformation engine. Power Query is the same technology you may have used in Excel or Power BI Desktop — familiar if you've used it, learnable from scratch if you haven't.
The destination: A Fabric Lakehouse, where each query in the dataflow will write to its own Delta table under the Tables section of the lakehouse.
The dataflow acts as a bridge. It authenticates to SharePoint using your credentials (or a service principal), reads the data, applies whatever shaping you define in Power Query, and then writes the output to the lakehouse on each refresh. The lakehouse stores it in Delta format, which means it's immediately accessible via the SQL Analytics Endpoint, Spark notebooks, or Power BI.
Note
Dataflow Gen2 is distinct from the classic "Dataflow Gen1" you might know from Power BI service. Gen2 has native support for Fabric destinations, including Lakehouses and Warehouses, and uses a staging layer internally to optimize writes. The user interface looks similar to Power Query Online.
For this lesson, we'll use a realistic scenario: a retail company tracks regional price adjustments in an Excel workbook and product status flags in a SharePoint List.
Imagine a file called RegionalPricing.xlsx stored in a SharePoint document library at https://yourcompany.sharepoint.com/sites/DataTeam/Shared Documents/. It has a single sheet called PriceAdjustments with columns:
ProductID (text, e.g., "SKU-1042")Region (text, e.g., "Northeast")AdjustmentPercent (number, e.g., 5.5)EffectiveDate (date, e.g., 2024-03-01)ApprovedBy (text, e.g., "M. Hernandez")Business users update this file weekly. Some rows have blank ApprovedBy values when the approval is still pending — something we'll handle in the transformation.
A SharePoint List called ProductStatusTracker on the same site has these columns:
Title (SharePoint's built-in name column, used here as ProductID)ProductName (text)Status (choice field: "Active", "Discontinued", "Under Review")LastReviewDate (date)Notes (multi-line text)SharePoint Lists carry a lot of system metadata columns — things like ContentType, _ModerationStatus, GUID, and many others that you absolutely do not want in your Delta table. We'll filter those out.
Navigate to your Fabric workspace. In the left navigation bar, make sure you're in the correct workspace, then click New and select Dataflow Gen2 from the list of item types.
The Dataflow Gen2 editor opens. It's a Power Query Online environment — a canvas on the left showing your queries, a preview pane in the middle, and a properties panel on the right.
The first thing you'll see is a prompt to Get data. This is where you configure your first source connection.
Click Get data in the editor. A connector search dialog opens. Type "SharePoint" in the search box. You'll see two relevant connectors:
For the Excel workbook, choose SharePoint Online folder. This connector gives you a file browser experience over a SharePoint document library, which is exactly what you need when your Excel file sits in a standard "Shared Documents" library.
In the Site URL field, enter the root URL of your SharePoint site — just the site portion, not the full path to the file. For example: https://yourcompany.sharepoint.com/sites/DataTeam
Click Next. If this is the first time you've connected to this site, you'll be prompted to sign in. Use your organizational account. Once authenticated, the connector shows you all the files and folders available in the site's document libraries.
You'll see a list of files, each represented as a row with metadata columns like Name, Extension, Date modified, and a Content column that contains the binary file data.
Tip
The SharePoint folder connector returns all files in the library, not just your Excel file. You'll need to filter immediately. In the Power Query formula bar or using the row filters on the Name column, filter to show only the row where Name equals RegionalPricing.xlsx. Then click on the binary value in the Content column to drill into that file. Power Query will automatically detect it as an Excel workbook and present the sheets inside.
After drilling into the file, select the PriceAdjustments sheet and click Transform Data (or the equivalent button in the navigator). The sheet data loads into a Power Query table.
The first row of your Excel sheet is likely your header row, but Power Query may treat it as data. If that happens, go to Transform → Use First Row as Headers in the ribbon. Now your columns have proper names.
With your first query open, click Get data again to add a second source. This time, search for and select SharePoint Online list.
Enter the same site URL: https://yourcompany.sharepoint.com/sites/DataTeam
Click Next. You'll see a list of all SharePoint Lists on that site. Find ProductStatusTracker and check the box next to it, then click Transform Data (or Create).
Your second query loads. This is where you immediately see the SharePoint metadata problem — the preview grid is flooded with columns like ContentTypeId, _UIVersionString, Attachments, GUID, UniqueId, and dozens more. The actual business columns are buried in there.
Warning
Don't be tempted to just leave the extra columns in and filter them later in Power BI. Every one of those columns gets written to your Delta table, bloating your storage and making downstream queries harder to work with. Clean it up here, at the source.
To remove the unwanted columns, it's easiest to use Choose Columns (under the Home tab in the Power Query ribbon). Select only the columns you actually want:
Title (which contains the ProductID value)ProductNameStatusLastReviewDateNotesAfter choosing columns, rename Title to ProductID by double-clicking the column header or using Transform → Rename.
Now let's make both queries production-ready. This is where Power Query earns its keep.
Step 1 — Remove pending rows. The ApprovedBy column has blank values for rows not yet approved. For a price adjustment table, loading unapproved records into your Delta table would cause downstream reports to show prices that shouldn't be live yet. Filter the column:
Click the dropdown arrow on the ApprovedBy column header, uncheck (blank) and (null) from the filter list, then click OK.
Step 2 — Correct data types. Power Query sometimes reads Excel columns as "Any" type. Explicitly set:
AdjustmentPercent → Decimal NumberEffectiveDate → DateDo this by clicking the type icon to the left of each column name and selecting the correct type.
Step 3 — Add a load timestamp. Add a column that records when this record was processed, so you have traceability. Go to Add Column → Custom Column and use the formula:
= DateTime.LocalNow()
Name it LoadedAt. Set its type to DateTime.
Step 4 — Trim whitespace from text columns. Business users love accidental trailing spaces. Select all text columns (hold Shift to multi-select), then go to Transform → Format → Trim. This prevents "Northeast " and "Northeast" from being treated as different regions.
The SharePoint List data is cleaner structurally (no Excel formatting quirks), but it has a few of its own issues.
Step 1 — Handle the Notes column. SharePoint multi-line text fields sometimes come through with HTML markup or newline characters embedded. You can strip these using a custom column replacement. Add a custom column:
= Text.Clean([Notes])
This removes all non-printable characters, including embedded line breaks that would cause problems in some downstream tools.
Step 2 — Normalize the Status column. Check the distinct values in Status. If a list user typed "active" in lowercase instead of choosing from the dropdown, you'll have a mismatch. Select the Status column, go to Transform → Format → UPPERCASE, then use Replace Values to standardize: replace ACTIVE with Active, DISCONTINUED with Discontinued, UNDER REVIEW with Under Review. Better yet, consider a conditional column that maps the raw value explicitly.
Step 3 — Set data types. Set LastReviewDate to Date and all other text columns to Text.
Tip
Rename your queries to meaningful names in the left panel. Instead of "Query1" and "Query2," use names like RegionalPricing and ProductStatus. These names become the Delta table names in your Lakehouse, so choose names that will make sense to everyone querying the lakehouse later.
This is the step that makes Dataflow Gen2 fundamentally different from Power BI dataflows: instead of storing data in a proprietary Dataflow storage layer, you write directly to a Lakehouse Delta table.
For each query, you need to configure a Data destination. Click on your RegionalPricing query to make it active. At the bottom of the query editor, you'll see a section called Data destination. Click the + button (or "Add data destination") and select Lakehouse.
A connection dialog opens. It walks you through:
regional_pricing. This will appear under Tables in your LakehouseFor this scenario, Replace is the right choice. The Excel workbook is a full snapshot of the current approved price adjustments — there's no concept of incremental records here. Each refresh should give you the latest complete picture.
Repeat this process for the ProductStatus query, mapping it to a table named product_status in the same Lakehouse.
Key insight
When you choose "Replace" as the update method and run the dataflow for the first time, Fabric creates the Delta table schema automatically based on the columns in your Power Query output. If your column types change between refreshes (e.g., a text column becomes a number), you may hit schema mismatch errors. Lock down your data types in Power Query explicitly to prevent this.
Once both queries have destinations configured, click Publish in the top-right corner of the editor. Publishing saves the dataflow definition. It does not immediately run it.
After publishing, you're returned to your workspace. Find your new dataflow in the workspace item list. To trigger a manual run, click the three-dot menu next to the dataflow and select Refresh now.
The refresh runs. Depending on the size of your Excel file and SharePoint List, this typically takes 1-4 minutes for small datasets like these. The dataflow goes through internal staging (Fabric uses a staging Lakehouse behind the scenes to buffer data before writing to your destination) and then writes the final rows to your Delta tables.
When the refresh completes, navigate to your Lakehouse. Under the Tables section, you should see regional_pricing and product_status listed. Click on either table to preview the rows in the Lakehouse explorer.
Note
If your tables don't appear immediately, wait 30 seconds and refresh the Lakehouse browser. The Delta table metadata can take a moment to register after the first write.
Connecting once is useful. Connecting on a schedule is what makes this a real pipeline.
Go back to your workspace, find the dataflow, click the three-dot menu, and select Schedule refresh. You can configure:
Set the schedule to match how often the source data changes. If your pricing team updates the Excel workbook every Monday morning, a Monday 8:00 AM refresh gives the data team fresh data by the time business hours are in full swing.
For tighter orchestration — where this dataflow refresh needs to happen before a downstream Spark notebook or pipeline runs — you can embed the dataflow as an activity inside a Fabric Data Pipeline. That way, you get retry logic, dependency chaining, and monitoring in one place. This pattern is covered in Scheduling Dataflow Gen2 Refreshes and Chaining Them into a Fabric Data Pipeline for End-to-End Orchestration.
Work through this sequence to build the full solution described in this lesson:
Prepare your sources. Create a simple Excel file called RegionalPricing.xlsx with at least 10 rows using the columns described above (ProductID, Region, AdjustmentPercent, EffectiveDate, ApprovedBy). Include 2-3 rows with a blank ApprovedBy to test your filter. Upload it to a SharePoint document library on a site you have access to. Optionally, create a SharePoint List called ProductStatusTracker with the columns described above and add 5-10 rows.
Create the Dataflow Gen2. In your Fabric workspace, create a new Dataflow Gen2.
Connect to the Excel file. Use the SharePoint Online folder connector with your site URL. Filter to your file, drill into the sheet, and promote headers.
Apply transformations. Filter out blank ApprovedBy rows, set data types explicitly, trim text columns, and add a LoadedAt custom column.
Connect to the SharePoint List (if you created one). Remove all system columns using Choose Columns, rename Title to ProductID, clean the Notes column, and set data types.
Configure Lakehouse destinations. Set the data destination for each query to a Delta table in your Lakehouse. Use Replace as the update method.
Publish and refresh. Publish the dataflow, trigger a manual refresh, and verify the tables appear in your Lakehouse explorer.
Validate. Use the SQL Analytics Endpoint or the lakehouse table preview to query your new Delta tables. Verify that blank-approval rows are excluded from regional_pricing, and that your product_status table has the right columns with no SharePoint system metadata.
"I can't see my Excel sheet — Power Query shows the file as a binary."
This happens when you haven't drilled into the binary content. After filtering to your specific file in the SharePoint folder connector, click directly on the value in the Content column (it appears as Binary). Power Query will recognize it as an Excel workbook and present the sheet navigator.
"My data destination shows a warning about schema mismatch." This usually means the column types in your Power Query output don't match the existing Delta table schema. The fix is to explicitly set all column data types in Power Query rather than leaving them as "Any." If the table already exists with the wrong schema, you can delete the Delta table from the Lakehouse (right-click → Delete) and let the dataflow recreate it cleanly on the next refresh.
"The SharePoint List connector shows columns I didn't add." This is normal SharePoint behavior — Lists include dozens of system columns in their API response. Use Choose Columns in Power Query to whittle the output down to only the columns you need before writing to the Delta table.
"My refresh fails with an authentication error." Dataflow Gen2 stores connection credentials separately from your Fabric identity. Go to your workspace settings or the dataflow's connection settings and verify that the SharePoint connection is using valid credentials. If your password changed or MFA forced a re-authentication, you'll need to update the connection. For production scenarios, consider using a service account to avoid credential expiry tied to an individual's account.
"Rows I deleted from the Excel file are still in my Delta table." If you chose Append as the update method instead of Replace, the dataflow only adds new rows — it doesn't remove deleted ones. For a full-snapshot source like this Excel pricing file, switch to Replace in the data destination settings.
Warning
If your SharePoint site URL contains a managed path like /sites/ or /teams/, make sure you include it in the URL you provide to the connector. Entering only the domain (https://yourcompany.sharepoint.com) without the site path will cause the connector to list all sites, which can be confusing and may surface sites you don't intend to connect to.
You've now built a complete, refreshable pipeline that takes business-user-managed data from Excel and SharePoint Lists, cleans and transforms it with Power Query in Dataflow Gen2, and writes it to governed Delta tables in a Fabric Lakehouse. This pattern is enormously practical — it's one of the most common bridges between the "shadow IT" data that business users control and the structured data platform that the data team maintains.
Here's what you accomplished:
Where to go from here:
Once your Delta tables are populated, they're ready to serve downstream workloads. You can query them directly with T-SQL using the SQL Analytics Endpoint, join them with other lakehouse tables in a Spark notebook (see Transforming Data with Spark Notebooks in Microsoft Fabric: PySpark for Lakehouse Tables), or use them as inputs to a broader medallion architecture where these tables serve as your Bronze layer feeding Silver and Gold transformations (covered in Implementing the Medallion Architecture in Microsoft Fabric: Bronze, Silver, and Gold Layers).
For more advanced scenarios — like making your dataflow dynamically pull different files based on parameters passed from a pipeline — see Parameterizing Dataflow Gen2 Queries with Pipeline Integration.
Microsoft Fabric Fundamentals