Compare Excel file headers

Using StudioX. I have a file that has up to 42 columns. I have another spreadsheet with 42 columns as well.
How do I compare the headers of 42 columns of these two files are the same ?
I can do by ‘If’ condition by checking each value but it is not efficient. Any other ideas ?

Hi ,

Read the Excel , use assign variable to store list of columns for each DT. Then check if 2 list are same.