Bug 168305 - CSV import to Calc fails if value of a single cell exceeds 65536 characters
Summary: CSV import to Calc fails if value of a single cell exceeds 65536 characters
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.2.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CSV-Import
  Show dependency treegraph
 
Reported: 2025-09-07 11:53 UTC by interstellar pirate
Modified: 2025-09-08 05:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example csv file that leads to error (64.01 KB, text/csv)
2025-09-07 11:55 UTC, interstellar pirate
Details
Example file that does NOT lead to error (64.01 KB, text/csv)
2025-09-07 11:56 UTC, interstellar pirate
Details

Note You need to log in before you can comment on or make changes to this bug.
Description interstellar pirate 2025-09-07 11:53:08 UTC
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
Comment 1 interstellar pirate 2025-09-07 11:55:33 UTC
Created attachment 202714 [details]
example csv file that leads to error

This file was kindly provided by u/Tex2002ans
Comment 2 interstellar pirate 2025-09-07 11:56:19 UTC
Created attachment 202715 [details]
Example file that does NOT lead to error

This file was kindly provided by u/Tex2002ans on reddit
Comment 3 Robert Großkopf 2025-09-07 14:01:02 UTC
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
Comment 4 nobu 2025-09-07 22:45:53 UTC
by Wiki
likely 2^31 is the programmatic limit; tested to accept 70 million characters, although worked exceptionally laggy