Does Calc Ever Consolidate Cell Format Ranges?

For example, if I format A1:A20, B1:B20, C1:C20 at different times as “date”, does Calc ever consolidate then into A1:C20?

Or If I “overwrite” formatting for A1:A20, B1:B20, C1:C20 with a new format for 1:20 (all cols), does consolidation occur?

Or does the “cruft” keep accumulating?

I know I can “overlay” the formats of smaller ranges on top of other ones, that’s pretty intuitive.

Did you try?

1 Like

Are you referring to Consolidating Data or something else? Named ranges perhaps?

No, I am asking about how cell formatting data is managed.

Example: I format cells A1 though A100 individually as some format, say “-1234.567” (3 decimal places).

If I later format all of row A as “-1234.567” are those A1 through A100 cells’ individual formats purged?

This seems to be the case to some extent. I have a doc with several thousand rows of numbers that have been reformatted repeatedly over the years. If I select all the cells in it and reformat them in identical “-1234.56” format, the document is reduced about 15% in size. I am wondering if years of reformatting is accumulating cruft in the file.

This is a pretty trivial thing because as I understand it an .ods file is a compressed archive, so many repeated data items won’t grow th archive that much.

Yes, if you overwrite previous formatting with new formatting the old formatting is discarded. There aren’t layers to formatting.

There is no cruft in your file. Consider the following simple scenario. You need to manually document your spreadsheet by writing out all your formatting by hand, it would look something like the following:

Column A is bold text
Column B is Italic text
Column C is highlighted

Now format everything the same:

The whole sheet is bold.

See the difference in how much data is used to describe both situations? That is also how your document is made up, only in different language. That’s where the extra filesize comes from.

Only if you apply a cell style to them.

If you will have many cells formatted the same you can create a cell style with the attributes you want and apply it to those cells. No cruft from day 1 and, if you decide that formatting no longer suits, you can change the cell style and all those cells will change to match the new styling.

1 Like

SpecialCells » Extensions reveals that equally formatted ranges are consolidated when I do your test on a new sheet. However, this does not help if you ignore cell styles and edit/copy/paste dozens of attributes in hundreds of places. The tool can reveal thousands of disjunct cell format ranges after a sheet has been edited by multiple users over a long time period.

1 Like