Issue 18302 - Allow insertion of newline in a cell using a formula
Summary: Allow insertion of newline in a cell using a formula
Status: CLOSED DUPLICATE of issue 35913
Alias: None
Product: Calc
Classification: Application
Component: editing (show other issues)
Version: OOo 1.1 RC3
Hardware: All All
: P3 Trivial with 7 votes (vote)
Target Milestone: ---
Assignee: requirements
QA Contact: issues@sc
URL:
Keywords: oooqa, rfe_eval_ok
: 41428 59970 61753 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-08-17 08:11 UTC by fortran
Modified: 2013-08-07 15:13 UTC (History)
2 users (show)

See Also:
Issue Type: FEATURE
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
line breaks in formulas (5.34 KB, application/vnd.sun.xml.calc)
2006-07-11 12:14 UTC, claudiadzm
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description fortran 2003-08-17 08:11:55 UTC
Hello.
I would like to use =CONCATENATE(A1+2;<code for newline>; B2-4)
in a cell, where <code for newline> means that the text that is printed
in the cell has a newline in it (i.e printed on two rows).

Is it possible with 1.1RC3 ? If not, it would be a nice thing to have for some
tasks.
Comment 1 frank 2003-08-19 10:33:41 UTC
Hi Bettina,

1 4 u.

Frank
Comment 2 lohmaier 2004-10-23 21:00:27 UTC
If there was one, it probably would be by using CHAR(13) or similar. (but this
doesn't work right now)
reassigning, setting keywords according to new RFE-process

original summary: "newline in cell"

There should be a way to insert a manual break into a cell using a formula.
You can insert a manual break by pressing <ctrl>+<enter> but using CHAR(13) is
converted to a regular space.

running CODE() on a cell containing a manually inserted break at the beginning
returns "32" (=regular space) as well.

The textfunctions should be enhanced so that they can handle linebreaks as well.
Comment 3 frank 2005-01-27 08:16:25 UTC
*** Issue 41428 has been marked as a duplicate of this issue. ***
Comment 4 frank 2006-02-08 13:29:31 UTC
*** Issue 61753 has been marked as a duplicate of this issue. ***
Comment 5 frank 2006-03-03 09:13:43 UTC
*** Issue 59970 has been marked as a duplicate of this issue. ***
Comment 6 claudiadzm 2006-07-10 14:42:57 UTC
I found that &CHAR(10) sometimes works. But I found no difference within the 
cases that worked and those that don't. If somebody needs an example, I can 
send a sxc-file. In this file I copied the formula to a couple of lines and in 
some lines I've the breaks and in other lines I've something like a special 
character between the strings that should be seperatet by the break. 
To contact me: claudia.drechsle@yahoo.de 
Comment 7 claudiadzm 2006-07-11 12:12:52 UTC
I found, when Calc accepts CHAR(10) as line-break:

When the result-string is smaller than the result-cell, Calc does not insert a
line-break

When the result-string is wider than the result-cell, then Calc does not wrap
the text automatically but inserts line-break at exactly the points that are
marked by CHAR(10).

So it seems, as if Calc recognizes CHAR(10) but in the case of text that is
smaller than the cell the normally text-flow has a higher prioritxy.

Claudia
Comment 8 claudiadzm 2006-07-11 12:14:05 UTC
Created attachment 37656 [details]
line breaks in formulas
Comment 9 ansorg 2006-07-11 13:44:54 UTC
some further observations using OOO-2.0.3

try the following:

1.) put "A" in A1, "B" in B1, "C" in C1

2.) in D1 insert formula =A1&CHAR(10)&B1&CHAR(10)&C1

Content of D1 looks like "ABC"

now copy D1 and paste into a Text editor (SciTe used here):
You get 
A
B
C

so the breaks are there in the Calc data!


to get Calc show the breaks continue

3. format D1 like: "Format Cells => Alignment => Wrap text automatically"

4. make column D smaller until letter "C" seems to get cut off: rendered text
gets split into three lines

voila :)


seems like the break is there but just not rendered correctly in the Calc Cell


Jens
Comment 10 claudiadzm 2006-07-17 11:43:46 UTC
Considering the last comments to this issue, it seems to me, that the issue type
should not be "feature" but "defect". 
Claudia
Comment 11 prowlerxpla 2007-11-01 10:36:32 UTC
I have the same opinion of Claudia, propose to change to defect
Comment 12 erack 2008-08-10 17:01:06 UTC
Please transfer your votes to issue 35913.

*** This issue has been marked as a duplicate of 35913 ***
Comment 13 erack 2008-08-10 17:01:38 UTC
Closing dup.
Comment 14 claudiadzm 2008-08-14 13:20:01 UTC
I found that the situation has worsend. In OOo 2.3 the &CHAR(10)- tip doesn't
work even when the cell is smaller than the sring before the CHAR-function.