Make an LLM output a real Excel file with a Dify workflow (open-source DSL from China's 嗯哌AI)
Chinese creator 嗯哌AI (Banny) open-sourced 30+ Dify workflows (≈2.7k GitHub stars). Excel_Flask_Dify pairs Dify with a tiny Flask service that turns model-generated fields and rows into an .xlsx file.
Visit site Dify + Flask ↗- Pricing
- Free
- Region
- Global
- Where it's from
- Chinese community
- Added
- Oct 16, 2026
- Tested on
- Oct 16, 2026
- Version we used
- BannyLon/DifyAIA Excel_Flask_Dify (clone 2026-10-16)
- Categories
- Automation & AgentsProductivity
- Original author
- 嗯哌AI (Banny) @NpieAI ↗
- Our test
- Partly tested
- Cost / time
- MIT-licensed and free; Dify can be self-hosted or used in the cloud, and model calls cost whatever your chosen model charges. Getting the Flask half running took us about 5 minutes.
- Source
- GitHub ↗X @NpieAI ↗
The task
Have an LLM produce structured data (columns + rows) from a description and save it as an actual Excel file instead of a Markdown table.
Steps
- git clone https://github.com/BannyLon/DifyAIA and open the Excel_Flask_Dify folder.
- pip install flask pandas xlsxwriter, then run python3 Excel_flask_Service.py inside Excel_flask_Service (listens on port 9000).
- Import the DSL file "Dify AI应用:Excel_Flask_Dify.yml" into Dify.
- Point the workflow's HTTP request node at your Flask service (/create_excel).
- Run it: the model emits JSON like {"fields": [...], "values": {field: [...]}} and the service writes a timestamped .xlsx into data/.
Prompt
Example body for POST /create_excel (the one we tested):
{"fields":["City","Pop (10k)"],"values":{"City":["Shanghai","Beijing"],"Pop (10k)":[2487,2185]}}What the author says
Author 嗯哌AI open-sourced 30+ Dify workflows (~2.7k stars) and says Excel_Flask_Dify was debugged at release; there is also a Bilibili walkthrough (Chinese).
Our test
On 2026-10-16 we ran the Flask service on Linux and called /create_excel. We did not run the LLM half inside Dify.
What we found when we tried it:On success it wrote a timestamped xlsx that pandas read back correctly; mismatched column lengths returned 400. Success body like {"message":"File created successfully.","file_path":".../data/output_<timestamp>.xlsx"}.
How to get in
GitHub repo and DSL work without Chinese social apps. The author’s walkthrough is on Bilibili (Chinese); English readers can follow the repo README and the YAML.
Who it suits
Ops folks, analysts and indie devs already on Dify who want AI to hand over deliverable files (sheets, decks, docs). A rare English pointer to a popular Chinese workflow library.
Pitfalls
- The script runs with debug=True on 0.0.0.0. Fine locally, but turn debug off and add auth before exposing it.
- It returns a server-side file path, not a download link; add a download endpoint if users need the file from Dify.
- The author notes workflows were debugged at release but may break with newer Dify versions or different models.
- If Dify runs in Docker, the HTTP node can't reach localhost; use the host's address.
More in this category
- Scan a skill before installing, then read the flagged linesCodingSkillSpectoruvFree; static scan needs no model● Tested by usChina
- Isolate an always-on agent on its own machine, then red-team itAutomation & AgentsOpenClawClaude CodeOllama$20/mo Ollama Cloud + a Claude plan○ Not tested by usOverseas
- A to-do list beside your agents, one AI chat per taskProductivityToday BoardcmuxClaude CodeFree, open source; needs macOS + cmux◐ Partly testedChina
- Give your agent 300 search sourcesResearchArgoClaude CodeCodexFree; works without API keys◐ Partly testedChina
- Learn a website task once, replay it with no model callsAutomation & AgentsDejoClaude CodePlaywrightFree; needs Python 3.11+◐ Partly testedOverseas