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