daff
daff copied to clipboard
Show row number or fixed column in diff
Hi,
is it possible to always show a column in the diff? I am comparing excel sheets with 10.000 rows and more and need the line number for context. Otherwise it is impossible to know where the difference inside the sheet is.
Do you have a lot of columns @watho? If not too many --all-columns
might be adequate - it will turn off pruning of unchanged columns.
Yes, over 50. That's not an option.
Thx for the quick answer.
Hmm it has been a while since I looked at this, but I'd have expected the leftmost columns to be shown by default. Is line number an explicit column in your diff? If not, the --index
flag may be what you are looking for, it makes the row and column mappings explicit, and the row mappings include corresponding row numbers in the two tables:
$ daff --index data.csv data2.csv
@:@, ,A:A,B:B,...,I:I,J:J
,@@ ,a ,b ,...,i ,j
,...,...,...,...,...,...
2:2, ,101,2 ,...,9 ,10
3:3,→ ,103,2 ,...,9 ,10→100
Somehow i missed this option and created my own rownumber column. Looking at the code the --index flag correspondents to the flag always_show_order
on CompareFlags, right? I will try this.