What is the maximum number of characters in a Calc cell?

In LibreOffice Calc, what is the maximum number of characters in a cell? (In comparison: the xls format has 32,767 characters, and it seems .xlsx also has that limit).
I’d like to programmatically create Calc files and would like to know the limit (if any) and whether it is likely to change.

How to increase cell maximum length 32768 to 50000

You might find some answershere.

The Q&A topic linked here is very old and the given information is no longer valid.

Reopened for… The answers to this question formerly given are no longer valid.

For many versions the maximum number of characters per Cal cell was 65535 (=2^15 - 1) (=2^16 - 1) [rectified 2020-05-23].

As of today, tested with LibreOffice V 6.3.3, there is no longer a relevant limit to that number.
I couldn’t find release notes for any version clearly stating the number, but got experimentally that it now is 268435455 (= 2^28 - 1). This means you can easily keep the text string of all “The Song of Ice and Fire” in a single cell of a Calc spreadsheet.
You may, however, get “bad allocation” problems If you try to come near that maximum with many cells or to work with such a cell in a formula needing to move the string to memory…

Some spreadsheet functions though may still be limited to process only up to 64k characters per cell.

This is not correct. The limit is somewhere under 1,316,350. That is the character count in Writer for a log file I tried to open in Calc and failed because the cell character limit was exceeded. It was exceeded because calc fails to continue to parse the delimiter after 108 lines for some reason and puts the rest in one cell.


Thanks for that, bummer the FAQ doesn’t seem to come up in searches. Now if I could figure out why it stops parsing the delimiter…

Probably the data is malformed for CSV and opens a quoted field that is never closed, thus the remainder correctly is all read into one cell. In the raw file search for a sequence of ," (if the field separator is comma) and see if that quoted field is closed, i.e. either by ", or a single " at line end.