We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Extract change history as text from track changes in Excel using Java

ASPOSE APIs, which will identify any changes made in Excel file (e.g. text update, format update, formula update, add/delete sheet, add/delete row(s), column(s) etc

Team can you please help me to find any api to fulfill the requirement.

@gitesh,

Thanks for your query.

Well, Aspose.Cells follows Ms Excel standards and specifications and supports the features which Ms Excel incorporates or it is feasible enough considering its source file structures and formats. I think there may not be an exact comparison feature in MS Excel, so it might not be supported. If you think there is similar feature in MS Excel, let us know with details and we will check it.

1 Like

Thank you Team for Quick reply.

@gitesh,
You are welcome.

Hi , This feature is available in excel
please review the below documentation

Thanks,
Gitesh

@gitesh,

Thank for the details.

We already logged a ticket for it into our database to investigate and support it. Once we have any news on it, we will let you know.

The ticket was recorded as follows:
CELLSJAVA-42557 - Extract change history as text from track changes

Hi @gitesh,

Have you found any solution for tracking changes? I have similar requirement and looking for some solution to achieve this.

Thank you

@ksupriya, @gitesh

We have a good news for you. We have analyzed the feature already. We plan to publish more APIs about Revision collections (e.g Revisions.RevisionLogCollection). We will try to complete the feature before the end of April, 2020.

Please try our latest version/fix: Aspose.Cells for Java v20.3.3 (attached)
aspose-cells-20.3.3-java.zip (7.0 MB)

Your issue should be fixed in it. See the following sample code for reference.
e.g
Sample code:

Workbook workbook = new Workbook(file);
                foreach(RevisionLog log in workbook.Worksheets.RevisionLogs)
                {
                    RevisionCollection rvs = log.Revisions;
                    foreach (Revision rv in rvs)
                    {
                        switch (rv.Type)
                        {

                            case RevisionType.InsertDelete:
                                RevisionInsertDelete rrc = (RevisionInsertDelete)rv;
                                Console.WriteLine(string.Format("ActionType :{0}; newArea : {1}.", rrc.ActionType, rrc.CellArea));
                                Console.WriteLine(rrc.CellArea);
                                break;
                            case RevisionType.ChangeCells:
                                RevisionCellChange rcc = (RevisionCellChange)rv;
                                string str = string.Format("CellName :{0}; OldValue : {1} ;NewOld : {2}.", rcc.CellName, rcc.OldValue, rcc.NewValue);
                                Console.WriteLine(str);
                                break;
                            case RevisionType.MoveCells:
                                RevisionCellMove rm = (RevisionCellMove)rv;
                                Console.WriteLine(string.Format("SourceArea :{0}; newArea : {1}.", rm.SourceArea, rm.DestinationArea));
                                break;
                            case RevisionType.CustomView:
                                RevisionCustomView rcv = (RevisionCustomView)rv;
                                Console.WriteLine(string.Format("ActionType :{0}; guid : {1}.", rcv.ActionType, rcv.Guid));
                                break;
                            case RevisionType.Format:
                                RevisionFormat rfmt = (RevisionFormat)rv;
                                Console.WriteLine(string.Format("worksheet :{0}; area : {1}.", rfmt.Worksheet.Name, rfmt.Areas[0]));
                                break;
                            case RevisionType.InsertSheet:
                                RevisionInsertSheet ris = (RevisionInsertSheet)rv;
                                Console.WriteLine(string.Format("newsheet :{0}; sheetPosition : {1}.", ris.Name, ris.SheetPosition));
                                break;
                            case RevisionType.DefinedName:
                                RevisionDefinedName rdn = (RevisionDefinedName)rv;
                                Console.WriteLine(string.Format("Test :{0}; oldFormula :{1};  newformula : {2}.", rdn.Text, rdn.OldFormula, rdn.NewFormula));

                                break;
                            case RevisionType.RenameSheet:
                                RevisionRenameSheet rsnm = (RevisionRenameSheet)rv;
                                Console.WriteLine(string.Format("OldName :{0}; newName :{1}.", rsnm.OldName, rsnm.NewName));
                                break;
                            default:
                                Console.WriteLine(rv.Type);
                                break;
                        }
                    }
                }