Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display Full Text in Excel without truncation

How to display Full Text in Excel without truncation programatically? Currently the data is getting truncated. Is it possible to automatically adjust the row height so as to display the enitre text?

like image 991
Naveen Avatar asked May 26 '11 13:05

Naveen


People also ask

Why is Excel truncating my numbers?

Here are some possible reasons why Excel might be rounding off numbers: The column width is not enough to accommodate all the numbers, so Excel ends up rounding numbers so that it can fit the final value in the cell that it can display completely. The number is too large and it's shown in the exponential format.

How do you cut long text in Excel?

Insert the TRUNC formula. In the first cell of the column, you want to populate with the truncated number, type an "=" sign to indicate you're using a formula. Then type TRUNC. Use an open parenthesis to add the operators of the formula. The first number you enter is the number you want to truncate.

How do I truncate text in Excel based on character?

The formula is "=DIRECTION(Cell Name, Number of characters to display)" without the quotation marks. For example: =LEFT(A3, 6) displays the first six characters in cell A3. If the text in A3 says "Cats are better", the truncated text will read "Cats a" in your selected cell.


2 Answers


I got these problems also and solved them this way:
For the first one, add the following property to your report:

net.sf.jasperreports.print.keep.full.text

and put it to true

You can also add this property to a specific text field. For more information, refer to this link

For the second one, as Deathtiny says, add isStretchWithOverflow=true to the field that you want, for it to grow with the amount of text in it.

I hope this helps.

like image 156
skw Avatar answered Oct 21 '22 08:10

skw


Try to set the isStretchWithOverflow property to True for the concerned textfield :

<textField isStretchWithOverflow="true">
   ...
</textField>

It worked for me.

like image 22
Deathtiny Avatar answered Oct 21 '22 08:10

Deathtiny