HACKER Q&A
📣 toyg

“Git” for Microsoft Office?


I’ve recently changed job and now I am basically swamped in MSOffice documents. This makes collaboration very hard: people are fearful you’ll touch their precious files, there are manual procedures to produce “gold” documents, fixing a typo is an ordeal, and if the same slide is present in 15 Powerpoint decks any edit will require tons of mindless and error-prone copypasting... it made me realize how good developers have it with git, github, and the likes.

Is there anything out there, capable of working with MSOffice stuff in a granular and collaborative way? I can’t believe non-geeks have lived like this for 30 years.


  👤 tomashubelbauer Accepted Answer ✓
This might not be exactly what you're asking for but I'll just leave it here in case someone finds it useful:

A couple years back I built this: https://github.com/tomashubelbauer/modern-office-git-diff

It is a pre-commit script which unpacks Office XML into text contents and tracks that alongside the source file. This way you can consider the binary to be a source of truth, but with each commit you also get a textual diff showing what changed content-wise. More or less.

Some person built the same thing for OpenOffice and I link their project in my readme, too.


👤 theshrike79
O365 has had live editing for a while now[1], it's not even that hard to use.

You can have that Golden Version and everyone can suggest changes and edits, then the document owner can accept or decline the edits.

[1]: https://support.office.com/en-us/article/Collaborate-on-Word...


👤 Jaruzel
An underused feature in MS Word is 'Compare documents' - It's under the Review tab on the ribbon as 'Compare'. It allows you to do a 'diff' style compare on two Word documents - it's invaluable for working out what changed between versions if the place you are working at doesn't have any other document tracking systems.

👤 jedieaston
Technically, tracked changes and SharePoint. But in practice, you’d rather send the changes to the project owner via carrier pigeon.

I’ve looked into what it would take to make a git style system for docx (since it’s just zipped XML, right :D), and the file format was a nightmare whenever an edit was made. Someone smart should take a look at it, as there would be a massive market for a DVCS for Office files. Imagine a world where every bill in Congress was committed to a central repo so the whole world could see the changes, or where someone in your team wants to play with the formatting on a shared requirements document without breaking the page you’re writing on. It would be a boon for productivity.


👤 bane
Use sharepoint, office365, and Teams. It versions, it supports collaborative editing, no more mailing things around, and so on.

👤 dec0dedab0de
Is there anything out there, capable of working with MSOffice stuff in a granular and collaborative way?

No, but people seem to get work done anyway. It's very strange to me.

My current and previous jobs are very corporate, so much of the business and IT uses Office products all the time. I somehow managed to set the standard that I don't do it that way. I still have to sometimes, but it's not very often.

The key is to acknowledge that using Office effectively is a difficult skill. It makes management feel smart that they know how to do something technical a developer doesn't. Then it's just a matter of finding and highlighting alternatives. Plain text and/or a wiki covers almost everything in my experience.


👤 jandinter
Working on it: https://julesdocs.com

It’s very hard though, because the files combine data and styling. Plus, the data is spread over several XML files.

If you want to message me: jan at the domain above

Edit: While Google Docs, Office365 and other collaborative editors are great for editing a document at the same time, from my point of view the real power of Git is branching, merging, and having a concept of distinct versions (which may consist of several files).


👤 nilsandrey
I've worked with non-geeks for many years and the best results were achieved with Sharepoint or O365. The versioning system it's simpler for them than GIT; it has a lot of missings but has great support on the clients' apps, specially MSWord and the revision and merge features.

There's a variant to use TortoiseGit as a git desktop client (only Windows) versioning directly office documents because of that one pops up the resolution of the conflicts directly with the office apps.

There're some folks followed me to markdown-git using desktop clients like Typora and Gitbook (editor and other services), but it's not suitable for everyone.


👤 discordance
Office365 has version history. You can flip back and forwards and see the changes any other collaborator has made. You can set the history to be pretty deep too:

https://support.office.com/en-us/article/enable-and-configur...


👤 mathie25
Check https://www.simuldocs.com/ It's a version control SaaS for Word documents. They took a lot of inspiration from git

👤 fzumstein
With Excel (the stuff that tends to be most critical), Microsoft has gone through a few iterations on this. Just a few days ago, they finally enabled a proper Version History on the online version of Excel, much in the same way as it’s been available with Google sheets for years. If you are bound to offline Excel, your options include 1) Shared workbooks 2) Co-authoring 4) Network drive 5) SharePoint 6) DropBox/OneDrive etc. You can get all the pros and cons in a recent blog post of mine: https://www.xltrail.com/blog/collaborate-on-excel-workbooks. I am part of a group of developers so we agree with you on wanting to have “GitHub for Excel” which is why we built: https://www.xltrail.com

👤 delcaran
If you use svn or git to track your files, both TortoiseSVN and TortoiseGIT when asked to compare two files (ie, "diff from last revision) will spawn the version manager integrated in office.

Is not perfect but it works.

Tested with TortoiseSVN 1.11.1, TortoiseGIT 2.10.0.2, MS Office 2010 on docx documents.


👤 eggsnbacon1
We fixed this at my company by converting our documents to markdown and using git. Can can also use LaTeX. They're honestly better formats for things like user manuals anyways because its trivial to display them on web and devices.

We have our non-technical editors using Markdown and git just fine, but you may have a lot of initial resistance. We were able to force them to switch because we're mostly a tech company. They hated it at first even though they love it now.

Never found a good solution to powerpoint


👤 wombatpm
Track changes works for Word. Still no solution for Excel.

One thing that can make things better is to teach people to use Styles correctly.



👤 tiffanyh
I assume you’re not using the online version of Office 365. It’s collaboration capabilities are better than most people give it credit for.

👤 thrower123
Using Office365 versions with Track Changes turned on is probably the most viable option with normal people.

Technically, you could use git, and it works decently with the xml-based Office file types, but it's a hard job to get people used to the workflow, and things like merge conflicts are going to be even more of a headache.


👤 jacekm
I vaguely remember that change tracking was a feature in Word even before O365 era. Nevertheless, like others said - Office365 is what you need. Versioning in O365 is not necessarily user friendly and intuitive, but it works. It saved me and my colleagues many times.

👤 anonme4ever
You should take a look at libreoffice collaborative feature, with the basic "track changes"[0] settings.

You can even work with multiple users as the same times (for example when opening files via webdav with nextcloud, or any other way to share your data) !

Edit: There's some recommendations on versionning odt files by using .fodt extension [1].

[0] https://wiki.documentfoundation.org/Track_changes

[1] https://wiki.documentfoundation.org/Libreoffice_and_subversi...


👤 taffit
For MS Access files there exists a project ([1], last activity in 2018) which basically splits the file into its components (like forms, queries, macros etc.) which you can then check into your VCS. This way, single versions of an MS-Access-file are diffable to previous versions and you can track exactly what has been done... in a developer fashioned way, though.

If you would need an exact version, you can build this version out of its components of that version.

[1] https://github.com/timabell/msaccess-vcs-integration/


👤 Bedon292
Microsoft Teams comes out of the box with the necessary SharePoint like features for document collaboration. That includes editing right in the web browser, as well as a button to open the document in your local install of Office. You can see if the document is synced online, look at changes, comment, and merge changes. Everything you need for a decent experience. No longer a need for setting the whole thing up yourself, and non technical folks can definitely use it.

You still have some pains with it, but its better than anything else I have seen for a non technical user.


👤 Intermernet
First point. MS office documents have a vaguely capable version control system built in. It's not Git, but it may be enough.

Second point, I haven't tested this, but docx, xlsx etc are XML based and may be happily Git compatible.

Third point, if the above doesn't work, look into automatically saving / converting documents into and out of a Git compatible format with minimal loss of formatting etc. You may be able to convince your team that this is an acceptable compromise between the tools they are used to, and the power of DVCS.


👤 eudoxus
Snipply[1] is a great option for you. It will be released shortly!

It allows you to create "Cards" or snippets of any size, of any part of the document, and save it, version it, and sync it with any other document. Even with documents in Google apps (Docs, and Sheets). A Card can be a sentence, paragraph, or entire document, up to you.

Disclaimer: I'm the CTO of its parent company.

[1] https://snipply.io/


👤 superjan
In my team we have been using svn/totortoisesvn to store our word documents. It integrates nicely with word’s doc compare.

👤 microcolonel
We're working with LibreOffice, but MS also supports OpenDocument. The quality of the XML produced by these programs is extremely poor. LibreOffice, for example, changes the name of every (or nearly every) automatic style every time you save, which makes it very hard to use the diffs. Also ODS doesn't stride formula references when you repeat rows, which baffles me.

Nonetheless, by simplifying the FODS files to use a subset of the format, the diffs are looking okay now. I created a wee little canonical string representation of the style parameters I want to use, and putting that string in the style:name attribute when I clean up the document.


👤 ToFab123
Yes. Store the document on OneDrive. Give people a link to the document and you can all collaborate on the same document in real time. Onedrive also has version history so you can revert / see / compare previous versions

👤 king_magic
I mean, this is what Office 365 does - and pretty well: collaboration and versioning.

👤 swiley
You might consider encouraging people to write markdown and then generate the final document using pandoc with an msword stylesheet.

This is what I did in college because (for some reason) everyone expects word files for everything.


👤 wiseleo
One aspect I find interesting is the need for ransomware protection. Looking into a way to automatically make git commits whenever a file is added or modified in a directory. The idea is to make it transparent to user, but possible for an admin to undo whatever damage they may have caused. I am not certain whether tortoisegit by itself can accomplish this. One repo would be local and another somewhere in the cloud.

👤 dirtnugget
Confluence has this: https://marketplace.atlassian.com/apps/1210818/scroll-versio...

Workplaces where knowledge is organised in some shared drives folder tree are rather unproductive by nature. There are tools to deal with that for a good reason.


👤 ssss11
Law firms use document management systems to maintain versioning of files, but only one user can edit at a time for the ones I’ve seen. I’ve found them to be annoying if I’m totally honest.

Ive also seen some advanced document comparison tools that plug into MS Word and redline differences (more advanced than the built in one).

I guess these tools could help ensure faith in the latest approved or “gold” version.


👤 wegs
I've used git+latex for a very long time, and more recently, git+markdown.

It works really well!

But it won't work with your nontechnical office staff. :(


👤 JamesG124
.docx is plain text xml though (You can even save explicitly as .xml which has all the images in base64).

Is track changes not good enough?


👤 WhiteOwlLion
Yes, it is called Google Docs. It has all the version history and the person that made the edit known. Still unimpressed with Office collaboration features and all the other Microsoft tools you need like SharePoint. Its 2020! Microsoft had 20 years to get it right and they are still giving us sub-par features.

👤 prepend
I wrote this comment in response to a deleted comment that said something like “use SharePoint.”

I find that most office users can’t use SharePoint. There’s too many things that are confusing or don’t work as expected, so it’s rare to find a business user who can set up SharePoint sites or workflows or even document organization.

So I’ve seen “SharePoint developers” who are consultants who know what to click and configure.

If I’m going to have to hire special people to make web sites, I’d rather just hire more technical people who can code something or tie together products. SharePoint developers cost the same as Wordpress developers to me.

The big advantage, I think, for collaboration software is to have contributors work directly with each other. Having to go through a secretary to convert work to some special format eats up the big benefits from stuff like SharePoint.


👤 dtsdwarak
If I understand correctly, this might be of some use - Git LFS.

An open source Git extension for versioning large files https://git-lfs.github.com/


👤 rb808
Word and Excel have Review menu items that allow fixing documents then adding edits and comments which need approving. Make sure you know how this works because most people dont use it.

👤 joyj2nd
I worked in clinical research with the FDA and complex word documents. I am not a programmer, but lordy lord, how often did I wish we would use something like git.


👤 quickthrower2
If it’s word you can use word itself as a diff tool to compare different versions. I guess just track versions in Git and you”re done.

👤 classified
> I can’t believe non-geeks have lived like this for 30 years.

Given how shitty MS software has always been, I can't believe people not only pay money for it but also accept it as the norm.

As for your question, non-geeks have been coping with this by saving a copy of a document before each edit so that when the inevitable catastrophe occurs, they can roll back. As a geek, you can use git manually. Adding that as a feature to Office would make it even more incompatible with itself than it already is.


👤 globular-toast
One thing I did to make this hell more tolerable is I would write all my documents in org-mode (markdown) and use Pandoc to convert to MS Word format for distribution. My Word documents actually looked better than everyone else's. I was still able to use git to control the source of the documents.

Less than a year later I left that job. I'd rather learn a trade than be paid to use MS Office.


👤 fomine3
Basically we should use OneDrive/SharePoint. For comparing just Excel files, WinMerge is my mate.

👤 nojito
Onedrive stores file changes as files are modified.

It even lets you switch to any version on the fly.


👤 fsflover
Would be also good to know if something similar exists for LibreOffice Writer.

👤 willis936
My SO does a lot of document writing and editing. She doesn’t write code, but wants her essential stuff backed up somewhere. I taught her the concept of version control and she literally uses git for her office documents. Not a perfect solution, but not a bad one imo.

👤 joaogfarias
LaTeX solves it :) It's simple markdown and full of extensions / hooks / templating, so any person can edit it in a controllable way.

https://grindeq.com/


👤 savrajsingh
Office 365 with documents stored in the cloud. #formerMSFT

👤 modmans2nd
Share point and Teams all the way

👤 jonwinstanley
Could you use Google Docs or something similar for some of the more collaborative documents?

👤 pabbasian
Microsoft Teams?!

👤 kwanbix
Office 365?

👤 yspeak
Nongeeks haven't been living with this. They (mostly lawyers) use document management version control systems like iManage ( https://imanage.com/product/document-email-management/) and professional comparison software like Workshare Compare https://www.litera.com/products/legal/workshare-compare/ (orders of magnitude better than tracked changes in Word though Word has gotten better over the years).

👤 kfk
Takeover more power and then move people to markdown with a sleight of hand. I cannot cope with MS Office anymore. I was in finance 5 years, plenty of Excel work, when I open Excel today I am quickly reminded how painful it is and go back to Python.