
π This article includes 1 downloadable practice file β
You do not need a cloud account to use a language model. Ollama downloads open models and runs them on your own computer: free, offline, and your data never leaves the machine β ideal for confidential spreadsheets and documents.
In this article
Install and run
Download the installer from ollama.com (Windows, macOS or Linux), then in a terminal:
ollama run llama3.2 # downloads ~2 GB the first time, then opens a chat
ollama list # models you have
ollama pull qwen2.5:7b # get another model
ollama rm qwen2.5:7b # free the disk space
Type a question at the >>> prompt; /bye exits.
What hardware do you need?
| Model size | Approx. download (4-bit) | Runs well on |
|---|---|---|
| 1β3B parameters | 1β2 GB | Any laptop with 8 GB RAM |
| 7β8B | 4β5 GB | 16 GB RAM, faster with a GPU or Apple silicon |
| 13β14B | 8β9 GB | 32 GB RAM or a GPU with 12 GB+ |
| 70B | 40 GB+ | Workstation-class hardware |
Models are “quantized” β their numbers stored in about 4 bits instead of 16 β which shrinks them roughly four times with a small quality loss.
Call it from Python
Ollama runs a local web API on port 11434:
import requests
def ask(prompt, model="llama3.2"):
r = requests.post("http://localhost:11434/api/generate",
json={"model": model, "prompt": prompt, "stream": False},
timeout=300)
return r.json()["response"]
print(ask("Give an Excel formula to extract the domain from an email in A2."))
Process a spreadsheet
import pandas as pd
df = pd.read_excel("feedback.xlsx") # column: Comment
df["Sentiment"] = [ask(f"Reply with one word, Positive, Negative or Neutral:\n{c}").strip()
for c in df["Comment"]]
df.to_excel("feedback_tagged.xlsx", index=False)
Hundreds of rows, no API bill, no data leaving your PC. Check a sample by hand β small models make more mistakes than big cloud ones.
Make your own assistant with a Modelfile
FROM llama3.2
PARAMETER temperature 0.2
SYSTEM You are an Excel expert. Reply with the formula first, then one line explaining it. Assume Excel 365.
ollama create excel-helper -f Modelfile
ollama run excel-helper
Which model to pick?
- Small and fast: llama3.2 (3B), qwen2.5 (3B) β tagging, short summaries.
- Better reasoning: 7β8B models such as llama3.1:8b or qwen2.5:7b.
- Code: coder variants such as qwen2.5-coder.
Next: give the local model your own documents to answer from β build a RAG chatbot.
π Practice files for this article
- πAll code from this post5 examples in one file, ready to open in your editor.β¬ SH Β· 1 KB
Free to use for learning. Files with macros (.bas) are plain text β import them with Alt+F11 β File β Import File, and always test on a copy.
Atul (AJ) builds office-automation and local-first AI tools as Atulya AI, and works with Excel, SAP and Oracle EPM every day. He writes about the shortcuts, macros and automations that actually save time β plus the occasional wacky fact. Videos on YouTube: Lazy Automator AI (@LazyAutomatorAI).
More posts by Atul βStuck on a step? Ask a question and the AI answers using this article.