Calc: automatically count how many characters there are in all sheets (within cells and comments)?

Let´s assume I have an .ods / .xlsx (.odt can be exported) file opened and edited in Calc. I need to edit it on my phone and then on my pc. (It is not very comfortable to simply copy the changes to the original documents.) If I have an .odt, I export it to .xlsx for practical reasons. Than, I edit within WPS Office and transfer to my computer (here I work in Calc). There are some concerns about compatibility. I need to ensure that no UNINTENTIONAL changes of text (of cells or comments) have been made.

The changes of formatting are perhaps inevitable but that´s not what I am concerned about. I would need to have f.e. some macro that counts all characters within all cells and comments (invisible characters should be excluded). As I edit my file on phone, I would add some condition, f. e.: exclude all characters after some unusually sequence (f. e. „!q“) which would also not been included. So, if I would write all new content after this sequence, I would be able to edit the file and the character counter in both files (the previous computer version and the later version from my cellphone) should display the same number. If the numbers are different, I should be told what cells exactly are different.

I try to write some macro with AI but it fails all the time. Can my task be accomplished? Should I try harder or give up?

Thank you.

LO 24.8.5.2 (X86_64)

CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: cs-CZ

Party. I see some exeptions:

A simple counter can not tell you where a change occured. So for this you would need to store a full grid of counters A1:7, A2:14…

Another problem is : character-count can not find all changes.
=40*A1" equals A1+B1`, so programmers created crc, md5, sha256… as much better alternatives.

Hard to judge. IMHO AI can help, if you have some skills with programming and the problems are solved elsewhere.

My first attempt would usually be to check, if “track changes” activated helps, but never tried with conversions to excel-formats and back.
.
Another option would be to compare exported .csv- versions of the files. There are existing programs like diff/meld for text.
.
I once wrote a program for specific datasets to compare and remember there is a lot of minor detail to be handled to differ between minor changes like “Test” vs "Test" and real edits.

Have you considered using Collabora Office on your phone instead of WPS Office? Collabora shares a lot of code with LibreOffice and uses .odf as default format.

see the .csv approach : How to show word & character count in Calc?