Share via

Powershell Excel Comparision

Ravindra Kumar 1 Reputation point
2021-01-06T05:27:07.237+00:00

Hi

I would like to compare two excel files,

can anyone assist me on this.

thanks,
Ravi Kumar

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-01-06T08:22:31.23+00:00

    Hi,

    What specifically do you want to compare? If you just want to know if the two files are identical you can compare the hash values of the files.

    (Get-FileHash -Path "D:\file1.xlsx").hash -eq (Get-FileHash -Path "D:\file2.xlsx").hash  
    

    Best Regards,
    Ian Xue

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.