Forum Discussion

rahul84gupta's avatar
rahul84gupta
Occasional Contributor
12 years ago

Powerpoint and Excel file comparision

Hi,



I want to compare powerpoint files  which contains Chart, Images and text data. I am able to record the script and run but testcomplete provides the result in byte format, which is difficult to find the issue i.e present on which slide/s.



Please let me know how i can compare the powerpoint and excel files and get the result in appropriate manner.



Thanks.

4 Replies


  • Hi Rahul,


     


    I agree with Alexei - creating your own comparison procedure seems to be the best suggestion here. It allows creating a feature-rich comparison of each slide.

     


    Another approach you may consider to use is to create image checkpoints for each slide. When executing the test, the image of the slide opened in PowerPoint will be compared with the stored one, and the corresponding comparison information will be posted to the Test Log. Please refer to the "About Region Checkpoints" and "About Regions Collection" articles. One of the advantages of this approach is that there is no need for coding to create a comparison function.


     

  • AlexKaras's avatar
    AlexKaras
    Community Hero
    Hi,



    > The difference in files displays in bytes [...]

    If you are talking about native TestComplete's files comparison function, than this is the only functionality available.

    You are trying to compare files that has very complex internal structure and thus it is very difficult to create a universal comparison function because it is not clear what properties you are interested in and what may be ignored during comparison.

    For the complex files, four options are available:

    a) Compare files as a binary stream to figure-out if files binary equal or not (this is what TestComplete does);

    b) Use the file's object structure provided by the file creation software and use this structure to iterate through the file, decide what properties you are interested in and compare them (this is what is done by the extension I mentioned previously);

    c) Use some third-party software that provides the comparison you need and use it;

    d) Decide what you need to compare and consider if some alternative approach is possible. E.g. if you are interested to compare text only, you may open file in the native software, use OCR to get the text from the screen and compare it with the existing master data.

    Obviously, options b), c) and d) must be implemented by you as only you know what and how you need to compare.
  • rahul84gupta's avatar
    rahul84gupta
    Occasional Contributor
    Thanks for the support.

    Also, The difference in files displays in bytes which is difficult to find on which slide/sheet the issue is.

    Please suggest on this too.