Git-friendly spreadsheet format? [closed]

  softwareengineering

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.

7

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).

7

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, particularly its spreadsheet tutorial.

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]

0.1

[shape]

1000 100 3

[grid]

7 22 0 ‘Testcode1’

8 9 0 ‘Testcode2’

[attributes]

[] [] [] [] [(0, 0)] 0 ‘textfont’ u’URW Chancery L’

[] [] [] [] [(0, 0)] 0 ‘pointsize’ 20

[row_heights]

0 0 56.0

7 0 25.0

[col_widths]

0 0 80.0

[macros]

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.

0

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.

Update:

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.

4

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.

Edit

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.

4

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.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT