This is a migrated thread and some comments may be shown as answers.

Report Viewer: Upon Excel export - set Textbox to nowrap

2 Answers 20 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Von Aaron
Top achievements
Rank 2
Von Aaron asked on 10 May 2017, 03:35 AM

Hi,

I have report which dynamically create a htmltextbox. Upon exporting to Excel via Report Viewer, the htmltextbox where merge. Is it possible to set it to nowrap and not merge programatically?.  (Please see Attachment.) 

I tried to set  can grow to false/true but no luck.

Appreciate your help.

Thank you.

private Telerik.Reporting.HtmlTextBox CreateTxtHeader(string FieldName, double swidth, double PosX, double PosY, bool isBold)
    {
        Telerik.Reporting.HtmlTextBox txtHead = new Telerik.Reporting.HtmlTextBox();
        txtHead.Size = new Telerik.Reporting.Drawing.SizeU(Unit.Inch(swidth), Telerik.Reporting.Drawing.Unit.Inch(0.3));
        txtHead.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(PosX), Telerik.Reporting.Drawing.Unit.Inch(PosY));
        txtHead.Style.BorderStyle.Default = BorderType.None;
        txtHead.Style.Font.Bold = isBold;
        txtHead.Style.Font.Size = Telerik.Reporting.Drawing.Unit.Point(intScale);
        txtHead.Style.Font.Name = "Arial";
        txtHead.Style.TextAlign = HorizontalAlign.Left;
        txtHead.Style.VerticalAlign = VerticalAlign.Middle;
        txtHead.StyleName = FieldName;
        txtHead.Value = FieldName;
        txtHead.CanGrow = true;
        return txtHead;
    }

 

-Im using Telerik Reporting Q3 2015 9.2.15.930

2 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 10 May 2017, 12:23 PM
Hello,

The text formatted via HTML and CSS is not preserved in Excel files - Excel Rendering. Also MS Excel uses its AutoFit functionality that defines the height of cells.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Von Aaron
Top achievements
Rank 2
answered on 11 May 2017, 03:13 AM

I understand now. Thank you Stef.

Tags
General Discussions
Asked by
Von Aaron
Top achievements
Rank 2
Answers by
Stef
Telerik team
Von Aaron
Top achievements
Rank 2
Share this question
or