Description: Importing a CSV file where the value of a single cell exceeds 65536 characters fails with error message: "The data could not be loaded completely because the maximum number of characters per cell was exceeded". However, copying the exact same value to a cell succeeds. Steps to Reproduce: 1. Open csv file containing a "cell" with a value of at least 65537 chars in Calc Actual Results: Error: "The data could not be loaded completely because the maximum number of characters per cell was exceeded" File is loaded, but cells with values over 65536 chars length are cropped. Expected Results: Calc should be able to load the file correctly since 65537 chars doesn't exceed the cell limit (can be pasted into cell). Reproducible: Always User Profile Reset: No Additional Info: Version: 24.2.7.2 (X86_64) / LibreOffice Community Build ID: 420(Build:2) CPU threads: 24; OS: Linux 6.8; UI render: default; VCL: x11 Locale: en-US (C.UTF-8); UI: en-US Ubuntu package version: 4:24.2.7-0ubuntu0.24.04.4 Calc: threaded
Created attachment 202714 [details] example csv file that leads to error This file was kindly provided by u/Tex2002ans
Created attachment 202715 [details] Example file that does NOT lead to error This file was kindly provided by u/Tex2002ans on reddit
Could confirm the behavior, but might be it is intended: CSV-data will be often used for import to database. VARCHAR-fields are limited in many databases to 2^16=65536 characters. …but also could be an old limit of cells in Calc… Tested with Version: 25.8.0.4 (X86_64) Build ID: 48f00303701489684e67c38c28aff00cd5929e67 CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb) Locale: de-DE (de_DE.UTF-8); UI: de-DE Calc: threaded
by Wiki likely 2^31 is the programmatic limit; tested to accept 70 million characters, although worked exceptionally laggy
A lot more discussion happened in: - https://old.reddit.com/r/libreoffice/comments/1n0pkce/calc_is_it_possible_to_change_the_maximum_number/ and I can confirm the issue in: Version: 25.8.1.1 (X86_64) Build ID: 54047653041915e595ad4e45cccea684809c77b5 CPU threads: 8; OS: Windows 11 X86_64 (build 22631); UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: threaded - - - STEPS TO REPRODUCE 0. Open Calc. 1. File > Open 2. Choose attachment 202714 [details]. 3. In the "Text Import" dialog, make sure: - Separator Options --- **Comma = ON** 4. Press OK. ERROR POPUP: Warning: "The data could not be loaded completely because the maximum number of characters per cell was exceeded." - - - NOTES If you repeat the same steps with attachment 202715 [details], it imports fine. The only difference is in a single cell: - 65,536 characters = no error - 65,537 characters = ERROR You can copy/paste that 65,537 characters into your ODS manually... but this import dialog fails if there is just 1 extra character in a single cell. - - - REAL-LIFE USE-CASE OP's original document was a lot of semi-colon separated "GEOJSON"-type data, so it was hundreds of thousands of rows of data, and then one column with: - a large amount of coordinate pairs. Most of OP's original cells were <65,536 characters, but only a handful were >65,537—causing this warning—which aborted their entire CSV Import. They were able to bisect their original "GEOJSON" file to narrow it down to a single problematic row, which lead us to this bug report! So let's say they were able to successfully import 99,999 rows of data, but a "random row" in the middle of certain files broke the Import. Very frustrating when only get a generic "too big" WARNING, and then you had to redo the File > Open -> CSV import from scratch, trying to figure out the trouble spot. Might be much better if the CSV Import would just handle everything up to Calc's theoretical "maximum # of characters in a cell". (Or, at least, potentially bump up this 65,536 limit...) - - - > likely 2^31 is the programmatic limit; tested to accept 70 million characters, although worked exceptionally laggy Yep. And that info is listed in: - LibreOffice Wiki: Frequently Asked Questions: "What is the maximum number of cells, rows, columns and sheets in a LibreOffice spreadsheet?" - https://wiki.documentfoundation.org/Faq/Calc/022 and discussed in: - Ask.LibreOffice.org: "What is the maximum number of characters in a Calc cell?" (2020) - https://ask.libreoffice.org/t/what-is-the-maximum-number-of-characters-in-a-calc-cell/5144/7 in comments by Mike Kaganski and erAck.