Text cell character limit in .csv

Discuss the spreadsheet application
Post Reply
dlg
Posts: 3
Joined: Thu Nov 26, 2015 2:42 pm

Text cell character limit in .csv

Post by dlg »

Hi,
I am making an .csv template for eBay. (OpenOffice Calc 4.1.1 13-08-2014 (WIN 8.1.), the same problem also for 4.1.2). I wish for all html listing design code to be in a single cell. (I need for all default titles and content to be in a 1st row)
When I copy it to A1 cell from Writer and save it as .csv tab delimited and reopen saved file, it splits my html content in 2 cells A1 and A2. A1 contains 16 367 characters and all remaining content is moved to A2 cell. If I delete some text on the beginning, it still divides in 2 parts, and again A1 contains 16 367 characters, A2 - remaining text.
I can't actually find anywhere OpenOffice Calc cell limit, I found only that it may be about 65 k (2^16). Can someone please assist me where I am making a mistake? Or at least I need to know is it possible to fit all my HTML in a single cell? (html contains approximately 25 400 characters). Or is this something related to .csv format limitations? I can't sort this out by myself at the moment
Last edited by dlg on Thu Nov 26, 2015 5:05 pm, edited 2 times in total.
OpenOffice 4.1.1
Win8
User avatar
Lupp
Volunteer
Posts: 3542
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: text cell character limit in .csv

Post by Lupp »

Maximum number of characters in a cell: 2^16-1=65535 (same as maximum for a paragraph in Writer)

Possible reason for your failing: The imported "text" (character sequence) may contain a Chr(13) (Chr(X0A)) which is an LF CR.
CR characters can be contained in cells if the text content is returned by a formula. However, direct input or import from plain text files is not supported. LF CR is not deselectable as a text separator.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
dlg
Posts: 3
Joined: Thu Nov 26, 2015 2:42 pm

Re: text cell character limit in .csv

Post by dlg »

Thank you for your advice. I have also updated my issue with more details. How can I find those CR characters if they are present in current cell? Can you suggest me something how can put all html in this A1 cell? It worked before, web designer just made a new HTML design for my eBay listings which i am trying to integrate into .csv.
OpenOffice 4.1.1
Win8
dlg
Posts: 3
Joined: Thu Nov 26, 2015 2:42 pm

Re: text cell character limit in .csv

Post by dlg »

If I just type plain text "qwertyuiop" directly into cell and copy it many times, it still does the same after saving, A1 cell contains only 16 367, and all remaining characters are moved to A2.
OpenOffice 4.1.1
Win8
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: text cell character limit in .csv

Post by acknak »

Hmm ... there does seem to be some limitation. If I copy/paste the html source for this forum page into a cell (~35k chars), then export to csv, none of the html is exported--the field is empty in the csv.
AOO4/LO5 • Linux • Fedora 23
User avatar
Lupp
Volunteer
Posts: 3542
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: text cell character limit in .csv

Post by Lupp »

@acknak
I just included this in my first test with LibreOffice 5.1.0.0 Beta1.

The html source copied from Firefox and then PastedSpecial as 'Unformatted text' without any separators chosen into the first cell of an empty spreadsheet resulted in 477 nonblank cells, 110 of whitch contained an empty string, up to row 608, thus with 131 blank cells sprinkled in. The plain text (ignoring html syntax) had obviously contained 607 CR.

The sheet was also successfully exported to a csv. The fortune of doublequotes I did not investigate.

The pasted text had a total length of 23014 characters. This was without my post, of course.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Post Reply