Comparing column in two excel file RRS feed

  • Question

  • Hi There,

    I am having two excel files (One with current date and another one with previous date).My goal is to create a power-shell script that will compare the Column no 5 of previous date file with today's file Column no 5 and same value matches it will write a message to Column no 6 of current file.

    And once the loop completed for comparing all rows ,save the current date file in csv format.

    Kindly suggest me some intial code or useful cmdlets  so that I can start writing the code.

    I was testing this with below statement

     $Previous_file = import-csv Event_Note_2018-02-04.csv
     $Todays_file = import-csv Event_Note_2018-02-05.csv
     compare $Previous_file $Todays_file -property E

    But the output is something different and its not helpful to write the mismatch in column 6.

    My out put is coming like below:-


    Thank you

    Wednesday, February 7, 2018 10:32 AM

All replies