Project 1 · Part 4 of 4
Sales against targets: a notebook reads Excel from SharePoint
Concepts
- Notebook: a page of cells, some with text and some with code, that you run in order. Fabric runs the code with Spark, a data-processing engine.
- pandas: a Python library for working with tables. It can read Excel files.
- Join: combining two tables on the columns they share, such as the store code and the month.
Hands-on exercise
Keep sales_vs_target.ipynb from Part 1 at hand.
Import the notebook
-
Open the workspace
ws-ex01-sharepointand select Import › Notebook › From this computer.
-
In Import status, select Upload and choose
sales_vs_target.ipynb.

-
Select
sales_vs_targetto open it.
Attach the lakehouse
The Explorer pane of the notebook reads No data sources added. The notebook cannot run until a lakehouse is added.
-
Select Add data items › From OneLake catalog.

-
Two items are named
lh_sharepoint_demo. Select the box next to the one with the lakehouse icon, then select Add. The other item is the SQL analytics endpoint, which is read-only. Pointing at an icon shows the item’s type.
Run the notebook
-
Select Run all.

-
When the third cell finishes, read its output.

-
Read the fourth cell, which builds the result.

-
Scroll to the end of the notebook.

Store Revenue, Nov 2026 (€) Target (€) % of target ATH01 Athens Syntagma 33,336.52 31,200 106.8 ATH02 Athens Kifisia 27,626.29 25,900 106.7 HER01 Heraklion Port 21,730.80 21,100 103.0 SKG01 Thessaloniki Centre 25,204.01 25,000 100.8 If your figures match, every part of the project worked: the shortcut to Targets, the self-updating table, the November sync and the notebook.
Change a target in SharePoint
-
In SharePoint, open Documents › Targets and select
targets_2026.xlsx. It opens in Excel in the browser. On the sheet Targets, change cell C10, the November target of ATH01, from31200to35000. Excel saves the change; close the browser tab.
-
In the notebook, select Run all again and scroll to the end.

Clean up
-
Remove what the project created, so that the two-minute check stops:
- In the lakehouse, select … next to
monthly_sales, then Delete. This stops the sync; the files in SharePoint are not affected. - To remove everything in Fabric, open the workspace, select Workspace settings, then Other › Remove this workspace, and confirm with Delete.
- If you no longer need the site, open it in SharePoint, select Settings (the gear icon) › Site information › Delete site, select the confirmation box, and select Delete.
- In the lakehouse, select … next to
How the notebook works
| Cell | What it does |
|---|---|
| 1 | Title and short description. |
| 2 | Names used later: the table monthly_sales, the shortcut Targets, the file targets_2026.xlsx and the result sales_vs_target. If you named anything differently, change it here. |
| 3 | Opens Files/Targets/targets_2026.xlsx through the shortcut and reads the sheets Targets and Stores with pandas. If the path cannot be read directly, it first copies the file to the Spark session with notebookutils.fs.cp. |
| 4 | Sums revenue per store and month from monthly_sales, joins the targets and store names, calculates the percentage of target, and saves sales_vs_target. |
The core of cell 3 is ordinary pandas, reading a file that lives in SharePoint:
local_path = f"/lakehouse/default/Files/{TARGETS_SHORTCUT}/{TARGETS_FILE}"
targets = pd.read_excel(local_path, sheet_name="Targets", dtype={"month": str})
stores = pd.read_excel(local_path, sheet_name="Stores")
Fabric can also convert Excel files into tables with a shortcut transformation, but that feature is in preview. This project therefore reads the workbook with code.
Before you use it at work
The project works on a trial, but a real setup needs these points. Checked on 4 December 2026; these features change often.
| Topic | What to know |
|---|---|
| Status | SharePoint shortcuts are documented without a preview label. CSV, Parquet and JSON transformations are generally available; Excel transformations are in preview. |
| What can be linked | Folders only, not single files. Enterprise SharePoint sites and OneDrive for Business only: no personal or on-premises sites, no subsites, no hub sites. Point each shortcut at the most specific folder. |
| Who signs in | In this project the connection uses your own account, so the lakehouse sees what you see. To reduce throttling, Microsoft advises a workspace identity instead. Only a workspace admin can set it up, and an administrator must give the identity the Sites.Selected permission and access to the site. |
| Throttling | SharePoint limits heavy use and answers with HTTP 429 errors. Avoid many parallel Spark jobs with the same user account, use narrow folders, and prefer a workspace identity. |
| Sensitivity labels | Compared only when a shortcut is created, never afterwards. |
| Copies and cost | A Files shortcut keeps no copy. A transformation keeps a converted copy and checks the folder every two minutes using Spark compute, until it is deleted. |
| When it fits | Business users keep working in SharePoint and Excel (targets, budgets, small reference lists), and the data team needs that data next to other data without manual exports. |
| When it does not | Large or fast-changing data, files whose columns change often, and production loads that depend on one person’s account. |
Sources and further reading
| Statement | Source |
|---|---|
Notebooks can be imported from your computer as .ipynb files; adding lakehouses to a notebook |
How to use notebooks |
| pandas reads a named sheet of an Excel file | pandas.read_excel |
| SQL analytics endpoint: read-only, same name as the lakehouse | SQL analytics endpoint |
| Excel transformations in preview; CSV, Parquet and JSON generally available. Deleting the transformation stops the sync and leaves the source files; Spark compute; two-minute check | Shortcut transformations |
| No preview label. Folders only; enterprise sites and OneDrive for Business; no subsites or hub sites; most specific folder. Workspace identity to reduce throttling; workspace admin; Sites.Selected; HTTP 429; parallel Spark jobs; labels compared at creation | Create a OneDrive or SharePoint shortcut |
| Deleting inside a shortcut deletes at the target | OneLake shortcuts |
| Workspace settings › Other › Remove this workspace › Delete | Lakehouse tutorial: clean up |
| Settings › Site information › Delete site | Delete a SharePoint site |
| Import › Notebook › From this computer, Upload, Imported successfully, Add data items, From OneLake catalog, the type shown when pointing at an icon, Run all, Session will start soon and its stated startup time, session ready in about ten seconds, cell outputs, figures, Excel in the browser, the changed target | Observed in Fabric, 30 November and 3 December 2026 |
| Notebook and sample data | Fabwreck (fictional data) |
| When it fits and when not | Fabwreck, based on the sources above |
Further reading: Fabric Notes 17 (Lakehouse Spark tables: managed vs external) on Fabric Notes, Microsoft Data Cloud Advocacy team.