Quantcast
Channel: Open XML Format SDK forum
Viewing all articles
Browse latest Browse all 1288

How to get track changes which are not accepted or rejected in excel

$
0
0

I want to find out pending track revisions in excel

Currently I am getting all the track revisions  programmatically in an excel file using open xml and c#

as below

            List<string> excelrevisions = new List<string>();
            using (var document = SpreadsheetDocument.Open(fileName, false))
            {
                if (document.WorkbookPart.WorkbookRevisionHeaderPart != null
                    && document.WorkbookPart.WorkbookRevisionHeaderPart
                        .GetPartsCountOfType<WorkbookRevisionLogPart>() != 0)
                {

                    foreach (DocumentFormat.OpenXml.Packaging.WorkbookRevisionLogPart logpart in document.WorkbookPart.WorkbookRevisionHeaderPart.WorkbookRevisionLogParts)
                    {
                        excelrevisions.Add(logpart.Revisions.InnerText);

                    }
            }

But my requirement is to identify  if any  track changes are there in excel  which is not yet accepted or rejected

I am not able to identify whether all the changes are accepted or rejected .

                     


Viewing all articles
Browse latest Browse all 1288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>