ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
2
AI-Powered Forecasting Template
3
Copilot + Python in Excel — companion workbook for the AI Stack Base guide
4
5
What's inside this workbook
6
1) Historical Data — 24 months of sample retail sales you can replace with your own numbers.
7
2) Forecast (Excel Formulas) — a working, auto-calculating 6-month forecast built with FORECAST.ETS, no add-ins required. This updates live in Excel and LibreOffice.
8
3) Python in Excel (PY Library) — ready-to-paste Python code blocks for the =PY() cells that ship with Microsoft 365's Python in Excel feature, covering trend decomposition, Holt-Winters/ETS, and seasonality charts.
9
4) Copilot Prompt Cheat Sheet — the exact prompts referenced in the article, organized by task.
10
5) Accuracy Comparison — an illustrative example comparing a traditional formula forecast against a Copilot + Python workflow, for Q4 inventory planning.
11
12
Important: about the =PY() cells
13
Python in Excel is a Microsoft 365 cloud feature — the Python code only runs inside a real Excel session connected to Microsoft's runtime, on Current Channel / Beta Channel builds. It cannot be pre-calculated or embedded as a working formula in a plain .xlsx file outside that environment.
14
That's why this workbook gives you two parallel tracks: a formula-only forecast (tab 2) that works everywhere right now, and a Python code library (tab 3) with tested snippets you paste directly into a =PY() cell once you open this file in Excel with Python enabled.
15
To enable it: Excel > Insert tab > Python (or type =PY( in a cell). If you don't see it, go to File > Options > Insert Formula Options and check your Microsoft 365 channel — it's rolling out gradually as of 2026.
16
17
Color legend
18
Blue text
Hardcoded input — safe to edit
19
Black text
Formula — do not overwrite
20
Yellow fill
Key assumption to review before publishing/using
21
22
How to use this with the article
23
Replace the sample data on tab 2 with the reader's own monthly figures, keep the formulas, and the forecast + chart recalculate automatically. This is the file meant to be offered as the lead magnet / paid template referenced in the E1 article.
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100