0

Let's say I have a workbook with two sheets: A and B.

I'm looking for a simple version control system that would allow two users to work on one workbook and keep it in sync. So,

  • User 1 works on sheet A
  • User 2 works on sheet B

What's a nice & simple way to keep the workbook synced for both users? I don't know if this would require a Macro to compare sheets or if there is some kind of version control software like git to do this.

zantuja
  • 211
  • 1
  • 4
  • 14
  • In principle, Git would be a suitable tool for this, _if_ the worksheets were represented by a plain text file. However, I believe that Excel workbooks are binaries, which would mean Git would not handle this type of file well. Have you thought about using Google spreadsheets which might support this better? – Tim Biegeleisen Nov 25 '16 at 03:41
  • Thing is, we are using a .xlsx file which as you mention is a binary. And we also do .txt sync, however this is a different story because regularly we need to keep our workbooks in sync, without having to copy- paste the modified sheets into the book. Sadly google spreadsheets is not an option, MS Excel is a must. Thanks! – zantuja Nov 25 '16 at 03:47
  • I don't think Git would allow for this. Suppose that you and a colleague each edit a worksheet. During the merge, Git would report that your colleague deleted the entire worksheet and added a new one (not containing your changes). He would see the same report about what you did. – Tim Biegeleisen Nov 25 '16 at 03:48
  • What about Excel online? If it's not too complex, chances are that Excel online will be able to handle it. Some things like data validation, Excel table objects, conditional formatting, etc, will need to be set up in Excel desktop, but data entry and other editing can be done online. Several people can edit the same workbook online. – teylyn Nov 25 '16 at 04:20
  • @TimBiegeleisen - FWIW, xlsx files are just a ZIP file containing multiple xml files. – YowE3K Nov 25 '16 at 07:23
  • @YowE3K I don't know if Git can handle a compressed file. But in theory it should be able to handle XML reasonably well (after all, we know it works for HTML). – Tim Biegeleisen Nov 25 '16 at 07:26

1 Answers1

0

You can change the .xlsx to .csv to do the version control by git.

After you make changes you can use git commit -am ‘comment’ to commit changes, and use git push to push your changes to remote.

The worst situation is when you want to push you local changes to remote, but the other user has pushed his/her changes to remote already. You need to pull the changes first, so you can do these steps:

git pull
git add a.xlsx
git commit -m 'comment'
git push

Other ways to do version control for excel, you can refer here.

Marina Liu
  • 36,876
  • 5
  • 61
  • 74