pleroma.debian.social

pleroma.debian.social

This time, every year, I really really want the ability to run a diff of two spreadsheets.

(And, no, retroactively applying the track changes feature is not that, even though it seems like it is (at least not for spreadsheets. For my task-at-hand, it's actually faster to just put the spreadsheets up on two screens and go line-by-line than it is to take two versions & try the track changes)

@bkuhn can't export to CSV and diff?

@bkuhn Hm, the "usual" trick is to combine the two spreadsheet docs into one (with multiple sheets), and then either just use `=IF($sheet1.A1 = $sheet2.A1;"same"; "different")` or such (and "grow" that to cover the complete size of the original tables), or to do the same, but with the conditional formatting functionality to mark differences e.g. in bold red.

@johns Oh, that's a thought. I think it might take me longer than the two-screen-compare-each-number solution because each file has 5-7 tabs, but I suppose I could write a script that exports each tab as CSV and generates the diffs. I should look into that.

@funkylab Indeed, that would work, but, again, doing that manually would take longer than just looking at every number myself.

Unless there is some automation floating around that would take two separate files, each with 5-7 tabs, and take the tabs with the same names, bring them into the same file, and generate the =(IF $s1.A1 = $S2.a2,"", "BAD!") code automatically.

Does that exist?

@bkuhn
The open document format is really a zip file of XML files. You can unzip and diff that?

Maybe diffoscope (from @reproducible_builds) is able to do a diff, too?
replies
1
announces
0
likes
0

@bkuhn
Oh.

I would use conditional markup and linked files for that.

In one of the two spreadsheets, link to the other one as a data source.

Then, create conditional markup so that if the contents of the current cell is different from the cell in that data source, colour the cell red.

This is me saying that without actually testing it, so might not be possible.
@funkylab

@wouter
@bkuhn @reproducible_builds

Saving in the "*.f???" formats puts them into an unarchived text XML format (so, .fods for spreadsheets, I think?)

I have diff'd those, and then grep-excluded boilerplate changes, to some benefit, but I'm not sure this would be thorough enough to save time.

@wouter
@bkuhn @reproducible_builds

(my primary interest in the f-formats was to explore versioning them in git)

@bkuhn nah, I think you'd have to Macro-code that, if "Sheet->Insert Sheet from file" and a manual "duplicate sheet, select all areas with actual content, paste the previously copied =IF(…) clause in there" is too much work.
Otherwise, I think it's assumed that Edit -> Track Changes -> Compare Document is sufficient for most users. It's terribly misplaced, as it has not much to do with tracking changes.

@bkuhn far from optimal, but my first inclination would be to export both to some text format (CSV, XML, JSON) and do `diff -u`.

I remember having this same problem in the past and I converted both sheets to CSV and applied diff on it. Not perfect, but it works.