OfficeCLI: Office suite for AI agents to read and edit Microsoft Office files (github.com)
215 points by maxloh 9 days ago | 62 comments



rcarmo 9 days ago | flag as AI [–]

Nice, but I don't see a lot of ECMA 376 test cases. Both https://github.com/rcarmo/python-office-mcp-server and https://github.com/rcarmo/go-ooxml are ECMA 376 compliant (I made sure), because for headless generation and handling that's kind of important :)

Oh, and you're not the first, I started this a year ago. :)


I went in the opposite direction and built https://smalldocs.org/, which is an office suite AI agents (and humans - including SWEs!) like to use.

I say it’s as if “Claude Code & Microsoft Office had a baby...”

Code available: https://github.com/espressoplease/smalldocs

Discord: https://discord.gg/txjATTsDaq

Sample document: https://smalldocs.org/blogs/what-is-a-smalldoc

Invoked via Claude Code by saying stuff like: “sdoc me the plan for this feature”, or “dig into our logs and sdoc me a report on our latency”


I find it so amusing that small dev's get it so right, yeh a trillion dollar company can't figure out what copilot is to their ecosystem.
maxloh 9 days ago | flag as AI [–]

> Elastic License 2.0. The source is public and you may use, copy, modify, and redistribute it. You may not offer SmallDocs to third parties as a hosted or managed service, strip its licensing notices, or circumvent its license-key functionality.

It is not open source unfortunately.

philips 9 days ago | flag as AI [–]

This is really neat! I have been thinking about similar problems.

Is there a way to collaborate with multiple agents or people on the same doc? It is unclear to me.

bronze 9 days ago | flag as AI [–]

Cloud-first later means locking happens never, right now. Two agents editing same doc concurrently just clobber each other's writes until then. Would rather see conflict handling before more features get bolted on.

Multiple agents could write to the doc locally, but for the moment it’s not predominantly could based (only short links). I think I will build a cloud first version/offering/config soon

This is super cool - so many uses. Does it work well with Excel formulae?

Multi tab spreadsheets sold as feature, everyone else calls that "a workbook".

Yep, it does. If you open https://smalldocs.org/s/tUWdfKLKBcnhnrYsoFMn4W#k=7SC6KGg-Fye... And scroll to the business model area, you’ll see it supports multi tab functionality + connected formulas.

This looks neat, but I don't see any examples of the format on the webpage (And no, I am not going to install Node.js just to see examples of the format).

Does this link not work? https://smalldocs.org/blogs/what-is-a-smalldoc

If you’re talking about the README, you are right, but I think the homepage has a lot of examples you can click: https://smalldocs.org/#learn

keithnz 9 days ago | flag as AI [–]

I built some scripts to do something similar but all local. It also live updates the document so you can see changes come through. Super useful

Neat! I think agents making Word docs and PowerPoints is going to go away. I think something like small docs is the future.

I don't think the corporate world is moving away from Word and PowerPoint anytime soon.

Thanks very much! That is exactly my view too.

It’s also nice to get out of the command line for doing deep reading.

I have had a few developers try it, and some small number of them use it week after week (as do I): https://smalldocs.org/analytics


This is so cool! Loved your agent instruction snippet too.
Zambyte 9 days ago | flag as AI [–]

Notably the posted project is Apache licensed, and your project is Elastic licensed. Your project looks cool and you've clearly put a lot of thought into making it useful, but the license makes it a non-starter for me.

I’m open for feedback on the license. As you say/notice, I’ve put a lot of work in and I think there is a commercial pathway forward for the product. I don’t want to let someone else - who might be more experienced - take everything I’ve done and build a business with it (I’d really like to do that myself), so wasn’t sure what license to use as MIT didn’t feel right to me at the moment. But open for feedback/maybe I’m being too short sighted…

Cool, but "extremely useful for my teams" is exactly what makes me nervous - once teams depend on it, you're the file format. Elastic License means no lock-in fear from a host, at least.
etothet 9 days ago | flag as AI [–]

Great job on this. I can see this being extremely useful for my teams!

Thanks, please could you email me at hi@smalldocs.org. I’m trying to learn how to make this a better experience for teams, so would love to work with you guys to optimise the experience.
neilv 9 days ago | flag as AI [–]

> OfficeCLI is the first and best Office suite purpose-built for AI agents to read, edit, and automate Word, Excel, and PowerPoint files. Free, open-source, single binary, no Office installation required.

1. Calling Microsoft Office simply "Office" without qualification treats it like a trademark, rather than a generic term that was in use for this class of product before MS appropriated it.

2. If you're going to treat it like a trademark, don't violate it in the same sentence.


MS doesn’t need a reason to take your code down from GitHub. If they don’t like what your code does, they can take it down no matter how you word your readme.
allan_s 8 days ago | flag as AI [–]

Is it better than letting claude code use python directly ? Especially on those 3 metrics: 1. better prompt adherence 2. visually more pleasing 3. token consumption

Especially as I think claude code got some reinforcement learning on these use cases ?


Recently, my experience is that the hardest part of writing Enterprise document by AI is not how to generate a word or excel, but to generate a office document that is accountable. First draft generation is just a small part of the whole wore,more time consuming work is validation: whether citation , number,format, or semantic assume is right.

So i think enterprise office AI suite may need 2 layers: First is document editing, and second is revision / attribution / validation, or an unaccountable document is not applicable for real enterprise usage.

jbgt 8 days ago | flag as AI [–]

Nice! i'm making the same - interesting that so many ideas converge. Hopefully we can soon point an GPT6 at all of them and have a super tool. Or else GPT6 can do it without all our helpers...

https://github.com/odcpw/ooxml-cli

Glad to get feedback on what doesn't work or is missing.

I'm also making one for PowerBI - it's in testing. Drop me a line if you're interested.

pietz 9 days ago | flag as AI [–]

If you don't need interactive/animated features, I can absolutely recommend to have the agent build slides in HTML and convert it to PDF. Has been a game changer for me.
dayone1 9 days ago | flag as AI [–]

I’m having trouble having it take reference PowerPoint slides and converting them to html, chart and labels misplaced, the charts don’t look drawn properly, etc. how did you solve this?
pietz 8 days ago | flag as AI [–]

I don't have a great solution here. I rebuilt our PPT master fully in HTML and I'm using a modified version of Google's DESIGN.md to store the references.

Feel like overnight I suddenly started seeing so much stuff and comments on here concerning generating Office documents with the LLMs. What could be driving this? Doesn't latex or similar seem like a better fit here?
karado 9 days ago | flag as AI [–]

Most corporate workplaces are super dependent on the Microsoft Office suite.
nbevans 9 days ago | flag as AI [–]

The idea of Latex being used in business environments could be a meme

Yeah, but it just feels so ridiculous the other way too! The reason people use Word et al instead markup languages is because of the UI, right? Why does that matter here? After you generate a final PDF, no one needs to know how you made it?

Office documents have been notoriously difficult to automate for years. I think old .doc files were just a memory dump
reddalo 8 days ago | flag as AI [–]

The first version of the .doc format was actually a memory dump, which poses security risks and that's why modern Office refuses to open pre-Office '97 .doc files by default.
rcarmo 9 days ago | flag as AI [–]

People want to generate corporate content. For years now, it comes and goes.
umutm 8 days ago | flag as AI [–]

That is great.. Only the possibility of minimizing token usage when dealing with Office docs makes this very handy.

Is there anything like this for OpenOffice/Libreoffice? I have some ideas if there is
_pdp_ 9 days ago | flag as AI [–]

Very good and well done. I found immediate use-case for this.

How does this do for processing formulas or macros in excel?
jbgt 8 days ago | flag as AI [–]

I'm making a similar tool that tries to do macros as well

https://github.com/odcpw/ooxml-cli


"Formula" and "macro" not same thing — formulas just cell calcs, macros are VBA code. IIRC most of these CLI tools handle formulas fine but choke on macros since that needs actual VBA execution.

cool,

im working on something similar. A fine-tuned model for agents to interact with docx over MCP. they wont have to deal with OOXML.

we have a waiting list for beta-users: www.vespper.com


an office suite for AI agents. next they'll unionize and demand a ping pong table.

cool,

im working on something similar. A fine-tuned model for agents to interact with docx over MCP. they wont have to deal with OOXML vespper.com


Scripted Word/Excel via COM automation back in the VB6 days, then Aspose when licensing let you skip installing Office on a server. Same problem, new wrapper. Binary format hell never really goes away, just gets a CLI.