Compare two csv/xls data

I need to compare two given csv data. Compare it with a function and should return true if both are identical. How do I achieve it?