Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

We're trying to move our project documentation process from Google Documents to a set of self-hosted Git repositories.

Text documents are Git-friendly enough, since we usually do not need any fancy formatting, we'll just convert everything to, say, multimarkdown with an option to embed LaTeX for complex cases.

But spreadsheets are quite different story... Is there a spreadsheed(-like) format that is friendly to version control systems (and, preferably, is as human-readable as Markdown)?

"Friendly format": Git works well with the format (it doesn't with XML) and it generates human-readable diffs (extra configuration involving external tools is OK).

Obviously, Markdown flavors allow one to build static tables, but I'd like to be able to use stuff like SUM() etc... (Note that CSV has the same problem.) No WYSIWYG is OK, but decent editor/tool support would be nice.

Update: Linux-friendly answers only, please. No MS Office stuff.

share|improve this question
Exactly what do you mean by "git-friendly"? I haven't used git a whole lot, but it handles binary files just fine and they can be versioned and tagged just like any text file. They just can't be diffed, but that may not be necessary. –  Thomas Owens Jan 4 '13 at 12:38
Friendly: I can view diff and easily figure out what was changed. Updated the question to reflect that. BTW, AFAIR, git, when properly configured, can show diffs for some binary formats (with the help of external tools, of course). –  Alexander Gladysh Jan 4 '13 at 15:03
I can't believe no one has asked you this but why do you need to store spreadsheets in the project repository? what are the spreadsheets for? usually they're complex enough that you need them in a different location and they're usually used by business people... –  omouse Jul 17 '13 at 18:30
This question appears to be off-topic because it is not related to programming. –  GlenH7 Jul 17 '13 at 21:17
add comment

closed as off-topic by GlenH7, MichaelT, Yannis Rizos Jul 18 '13 at 8:21

  • This question does not appear to be about software development within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

6 Answers

You can also use libreOffice/open-office-spreadsheet-non-zip-xml-fileformat "*.fods" which is plain xml. @glenatron s comment applies to this format, too.

The standard open ofice spreadsheet format "*.ods" is zipped xml and not so suitable for git (similar to @Egryan/@emuddudley answer).

share|improve this answer
I would like to avoid XML. Updated the question to reflect that. –  Alexander Gladysh Jan 4 '13 at 15:10
1. LibreOffice does work on Linux, indeed. 2. No, XML is not MS bullshit. However, XML and Git do not work well together (see @glenatron's comment above). –  Alexander Gladysh Jan 4 '13 at 18:27
@LazyBadger: DiffDog: no Linux support, closed-source, 500$/user. Sorry, but I'll pass. –  Alexander Gladysh Jan 4 '13 at 19:39
@AlexanderGladysh - Meld, xmldiff or How can I diff two XML files? topic on SU –  Lazy Badger Jan 4 '13 at 19:49
@LazyBadger: Note that 3-way merge is more important than, diff-ing. (But Google finds several suitable Linux command-line 3-way merge tools for XML.) I'll try these against LibreOffice spreadsheets, thanks. –  Alexander Gladysh Jan 4 '13 at 20:30
show 2 more comments

CSV (Comma Separated Values)

If you're just working with data it's probably the simplest and most commonly supported format.

Should make life easy if you want to diff between versions.

Oh, and Google Docs fully supports CSV import/export.


Then just write a Google Apps Script to stringify the formulas on export and do the reverse on import. You'll need to use some ingenuity because the format you're looking for doesn't exist.

share|improve this answer
Unfortunately, CSV does not support formula stuff like SUM() etc. –  Alexander Gladysh Jan 4 '13 at 17:05
I updated the question to say that explicitly. –  Alexander Gladysh Jan 4 '13 at 17:20
@AlexanderGladysh, actually I'd say CSV can handle equations just fine if you pick the right format, the issue is that you'd need to configure a reader such that it parses and evaluates those equations. –  zzzzBov Jul 17 '13 at 21:04
Emacs csv-mode might be a nice tool. I also consider Gnumerics for lightweight csv editing. Have yet to try these extensively. –  Brady Trainor Feb 9 at 23:55
add comment

What about pyspread? It's powerful and comes with a nice GUI.

According to the First Steps page:

The pys file format has changed in version 0.2.0. It now is a bzip2-ed Text file with the following structure:

[Pyspread save file version]



1000 100 3


7 22 0 'Testcode1'

8 9 0 'Testcode2'


[] [] [] [] [(0, 0)] 0 'textfont' u'URW Chancery L'

[] [] [] [] [(0, 0)] 0 'pointsize' 20


0 0 56.0

7 0 25.0


0 0 80.0


Macro text

The fact that it is bzip2-ed does not help but at least you can access a quite readable text.

Licence is GPLv3.

share|improve this answer
Interesting! Thanks! –  Alexander Gladysh Jan 4 '13 at 16:42
add comment

This may not fit your needs, but may fit another's. Org-mode for Emacs includes table.el, which, along with Org-mode's particular enhancements, provides an extremely robust solution for spreadsheets, all in plain text. More information (much more than the scope of this site) is available at Org-mode's website and manual, particular its spreadsheet tutorial.

enter image description here

share|improve this answer
add comment

I know that Microsoft Office 2007 and higher default to a propitiatory xml format when they save. So that should be friendly for Git. Open office also saves to a xml format if you are wanting to use a more open source solution. Since a XML is a text format git should be able to handle it fairly well

Since you are moving it from Google Documents you can download them has open documents which are xml based.


Since you are wanting a non Microsoft/XML solution you could always save has a CSV in open office though I am not sure how much functionality you lose by saving to this format.

share|improve this answer
I have seen some problems with Git disagreeing with XML formats or merging them in ways that aren't compliant with the format of the document. I believe this can be worked around by using an XML-specific merge tool, but I haven't seen this in use. –  glenatron Jan 4 '13 at 13:06
The Excel Workbook (*.xlsx) format is a collection of XML files in a ZIP container. You can choose XML Spreadsheet 2003 (*.xml) to save into a single XML file, but it only supports a subset of Excel's features. –  M. Dudley Jan 4 '13 at 14:00
XML wouldn't do, as per @glenatron comment above (I myself had such problems as well). Also: XML diffs are not quite human-readable IMO. Updated the question to reflect that. –  Alexander Gladysh Jan 4 '13 at 15:09
Well, CSV does not support any formula stuff. I can just use Markdown's tables then. Updated the question to reflect that. –  Alexander Gladysh Jan 4 '13 at 17:06
add comment

This might not be exact what you want I believe that libre office lets you reference outside file. You could have a spreadsheet that you treat like a database and have a static libre file that would be your interface. You would lose easy access summing in your versioned files unless you call them back, but it would work.

Another rather big issue with this would be that it is one directional.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.