Count wrapped text lines in cell [closed]

asked 2014-06-08 17:02:06 +0200

Dav1d gravatar image

updated 2015-09-05 01:07:38 +0200

Alex Kemp gravatar image

I would like to count the lines in a cell with "wrap text automatically" and "Hyphenation active" checked.

But every function I tried giving me the original text of the cell, not the wrapped one. For example I tried:

=LEN(A1)-LEN(SUBSTITUTE(A1;CHAR(13);""))+1

=LEN(A1)-LEN(SUBSTITUTE(A1;CHAR(10);""))+1

But LEN gives back the length of the original text without line break or hyphen.

I tried to save the file to all supporting formats, to parse it from code (for exaple Java) and then count the lines but the formats also containing only the original text. Only exporting to PDF saves the cell texts with line breaks and hyphen, but it's a bit inconvenient to parse, and I hope there is an easier way to do this.

version: 4.2.4.2

language: hungarian

component: Calc

OS: OS X 10.9.3 Maverics

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2016-02-24 21:09:41.521136