Shared Workbook Data
Within a shared workbook, the changes made to the spreadsheet at runtime are persisted as sets of different revisions collectively forming a revision history. These are persisted to the file on disk during a save event, and are saved in different xml parts known as revision logs. There is a headers table xml part that summarizes when changes were made, who made them, and it lists the relationship from each header to the individual revision log that records the specific changes.
First, take a look at the header table, and revision log:
<headers xmlns="…" xmlns:r="…" guid="{A84A6777-8908-4CB9-9EB6-625CEFF419D3}"> <header guid="{A84A6777-8908-4CB9-9EB6-625CEFF419D3}" dateTime="2006-07-14T13:42:54" maxSheetId="4" userName="UserName" r:id="rId1"> <sheetIdMap count="3"> <sheetId val="1"/> <sheetId val="2"/> <sheetId val="3"/> </sheetIdMap> </header> </headers>
And the revision log is essentially empty:
<revisions xmlns="…" xmlns:r="…"/>
Now, after inserting the text "foo" into cell A1, and saving, the header looks like this:
<headers xmlns="…" xmlns:r="…" guid="{CFEA9B63-728B-4274-A346-0440E1573AB4}" diskRevisions="1" revisionId="1" version="2"> <header guid="{A84A6777-8908-4CB9-9EB6-625CEFF419D3}" dateTime="2006-07-14T13:42:54" maxSheetId="4" userName="UserName" r:id="rId1"> <sheetIdMap count="3"> <sheetId val="1"/> <sheetId val="2"/> <sheetId val="3"/> </sheetIdMap> </header> <header guid="{CFEA9B63-728B-4274-A346-0440E1573AB4}" dateTime="2006-07-14T13:44:40" maxSheetId="4" userName="UserName" r:id="rId2" minRId="1"> <sheetIdMap count="3"> <sheetId val="1"/> <sheetId val="2"/> <sheetId val="3"/> </sheetIdMap> </header> </headers>
A new header entry is added, with a GUID and a revision ID (rId2) that specifies which log to look into to see the details about the revision.
The old log is saved, and the newly created log (corresponding to rId2) now looks like this:
<revisions xmlns="…" xmlns:r="…"> <rcc rId="1" sId="1"> <nc r="A1" t="inlineStr"> <is> <t>foo</t> <phoneticPr fontId="0"/> </is> </nc> </rcc> </revisions>
The log shows that the contents of a cell were revised, and the new cell contents is text containg "foo" as the string.
After inserting a new sheet, the header looks like this:
<headers xmlns="…" xmlns:r="…" guid="{7E1DAFA8-EF95-4865-8FE8-CC17B28635CF}" diskRevisions="1" revisionId="2" version="3"> <header guid="{A84A6777-8908-4CB9-9EB6-625CEFF419D3}" dateTime="2006-07-14T13:42:54" maxSheetId="4" userName="UserName" r:id="rId1"> <sheetIdMap count="3"> <sheetId val="1"/> <sheetId val="2"/> <sheetId val="3"/> </sheetIdMap> </header> <header guid="{CFEA9B63-728B-4274-A346-0440E1573AB4}" dateTime="2006-07-14T13:44:40" maxSheetId="4" userName="UserName" r:id="rId2" minRId="1"> <sheetIdMap count="3"> <sheetId val="1"/> <sheetId val="2"/> <sheetId val="3"/> </sheetIdMap> </header> <header guid="{7E1DAFA8-EF95-4865-8FE8-CC17B28635CF}" dateTime="2006-07-14T13:48:56" maxSheetId="5" userName="UserName" r:id="rId3" minRId="2"> <sheetIdMap count="4"> <sheetId val="1"/> <sheetId val="2"/> <sheetId val="3"/> <sheetId val="4"/> </sheetIdMap> </header> </headers>
You can see that the last, most recent, header entry shows an entry for the new sheet. The most recent log looks like this:
<revisions xmlns="…" xmlns:r="…"> <ris rId="2" sheetId="4" name="[shared example.xlsx]Sheet4" sheetPosition="3"/> <rcv guid="{841DBE00-ECD0-478E-893B-30CE5DABBEF5}" action="delete"/> <rcv guid="{841DBE00-ECD0-478E-893B-30CE5DABBEF5}" action="add"/> </revisions>
This shows the new sheet, sheetId 4, is added to the workbook. The custom view (rcv) for the user is updated as a new sheet was added.