Spaces on excel export on LL26

Hello everyone,

I set force wrap = true on all columns of my layouts.
Now, when i preview (or pdf view) the data on those columns are completely visible, and that is intended and working fine.
However, when exporting that to excel (xls
) and opening it, all the lines it was break in order to wrap correctly are showing spaces, and that is not intended.

As you can see on the attached files this happens always on any report.

How to avoid this(wrap is mandatory to print all data visible and not cutted) ?

Thanks and regards

Hello Carlos,

We could check here for the output device, using the LL variable “LL.OutputDevice”.

Cond(LL.OutputDevice = "XLS", False, True)

Hope this helps. If you have any further questions, please don’t hesitate to ask.

Hello Onursal,

we have the same Problem. We don’t have a Designer. We are using DataSet to bring the data to in a Grid-Preview.
We are forcing “Wraping” like that:

            var header = tableLineHeader.Fields.AddNewText();
            header.Wrapping.Line = "1"; // Automatischen Zeilenumbruch erzwingen
            header.Wrapping.Force = "true";
            header.Font.Bold = "True";

            var tableField = tableLineData.Fields.AddNewText();
            tableFieldText.OptimizeSpaces = "true";
            tableFieldText.Wrapping.Line = "1"; // Automatischen Zeilenumbruch erzwingen
            tableFieldText.Wrapping.Force = "true";

All the lines with breaks are showing spaces, when the data ist exported as CSV or Excel.

How can we prevent it im Code - We are using LL Version 22 and C# API.

Greetings from Germany
Özgür Ergel

Hi Özgür, thanks for your post, and welcome to our community.

Using the DOM-API, you can simply pass the above formula for the value:

tableFieldText.Wrapping.Force = "Cond(LL.OutputDevice = "XLS", FALSE, TRUE)";

Hope this helps!

Best regards from Lake Constance!

Thank you very much Onur.

The following helped me to set the formula also for other Output-Devices, that we use for exporting:

tableFieldText.Wrapping.Force = “Cond(LL.OutputDevice = “XLS” OR LL.OutputDevice = “XLSX” OR LL.OutputDevice = “TXT” , False, True)”;

The Problem is solved!

Best Regards from the Ruhrgebiet

1 Like