I am glad that we finally got Biff for radgrid but I have a issue and there is a lack of documentations so maybe you can help.
with ExcelML i was able to do the following in my code behind
and then
is there any way to do this with the RadGrid.BiffExporting Event?
Thanks In Advance
with ExcelML i was able to do the following in my code behind
Protected
Sub
ExportGrid_ExcelMLExportRowCreated(sender
As
Object
, e
As
GridExportExcelMLRowCreatedArgs)
Handles
ExportGrid.ExcelMLExportRowCreated
If
e.RowType = GridExportExcelMLRowType.HeaderRow
Then
For
Each
col
As
GridColumn
In
ExportGrid.MasterTableView.Columns
Dim
xlCell
As
CellElement = e.Row.Cells.GetCellByName(col.UniqueName)
xlCell.StyleValue =
"myStyle"
'xlCell.Attributes.Add("ss:Width", col.HeaderText.Length.ToString())
Next
End
If
End
Sub
and then
Protected
Sub
ExportGrid_ExcelMLExportStylesCreated(sender
As
Object
, e
As
GridExportExcelMLStyleCreatedArgs)
Handles
ExportGrid.ExcelMLExportStylesCreated
Dim
style =
New
StyleElement(
"myStyle"
)
style.AlignmentElement.Attributes.Add(
"ss:WrapText"
,
"1"
)
e.Styles.Add(style)
End
Sub
is there any way to do this with the RadGrid.BiffExporting Event?
Thanks In Advance
13 Answers, 1 is accepted
0
Accepted
Hello,
I noticed that my colleague Daniel have answered your query in the support thread you have opened.
In the Biff export you could use the BiffExporting event of RadGrid to achieve your goal:
Regards,
Andrey
the Telerik team
I noticed that my colleague Daniel have answered your query in the support thread you have opened.
In the Biff export you could use the BiffExporting event of RadGrid to achieve your goal:
protected
void
RadGrid1_BiffExporting(
object
sender, GridBiffExportingEventArgs e)
{
xls.Table tbl = e.ExportStructure.Tables[0];
tbl.Rows[1].Height = 30;
tbl.Columns[1].Width = 15;
}
Regards,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Mark
Top achievements
Rank 1
answered on 27 Jun 2012, 02:07 PM
just so everyone knows when he is referencing XLS it is this
using
xls = Telerik.Web.UI.ExportInfrastructure;
0
Hi,
Thank you for posting directions in this thread and helping the community.
Kind regards,
Andrey
the Telerik team
Thank you for posting directions in this thread and helping the community.
Kind regards,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Michael
Top achievements
Rank 2
answered on 19 Sep 2012, 02:42 PM
Andrey,
You did not answer the question how to add the 'WrapText' attribute using BiffExport.
Thanks,
You did not answer the question how to add the 'WrapText' attribute using BiffExport.
Thanks,
Michael
0
Hi,
Currently I do not see a way how this could be achieved, however, I will consult our Dev for a work-around or for implementation.
Excuse us for any inconvenience caused.
All the best,
Andrey
the Telerik team
Currently I do not see a way how this could be achieved, however, I will consult our Dev for a work-around or for implementation.
Excuse us for any inconvenience caused.
All the best,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Deepa
Top achievements
Rank 1
answered on 11 Sep 2013, 02:58 PM
Is there a solution for this problem? I used ExportInfrastructure to export grid contents to excel. I see only few properties that can be set as shown below. Is Wrap text supported? Is there any workaround?
ExportInfrastructure expCell;
expCell.Rowspan = rowSpan;
expCell.Style.Font.Size = fontSize;
expCell.Style.Font.Bold = fontBold;
expCell.Style.Font.Name = fontName;
expCell.Table.Rows[expCell.RowIndex].Height = rowHeight;
expCell.Style.HorizontalAlign = hAlign;
expCell.Style.VerticalAlign = VerticalAlign.Middle;
ExportInfrastructure expCell;
expCell.Rowspan = rowSpan;
expCell.Style.Font.Size = fontSize;
expCell.Style.Font.Bold = fontBold;
expCell.Style.Font.Name = fontName;
expCell.Table.Rows[expCell.RowIndex].Height = rowHeight;
expCell.Style.HorizontalAlign = hAlign;
expCell.Style.VerticalAlign = VerticalAlign.Middle;
0
Hello Deepa,
I am afraid that Biff export does not support wrapping and there isn't a workaround for it. You could consider using another export format as HTML format if you want such feature.
Regards,
Kostadin
Telerik
I am afraid that Biff export does not support wrapping and there isn't a workaround for it. You could consider using another export format as HTML format if you want such feature.
Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Avi
Top achievements
Rank 1
answered on 13 Feb 2014, 11:32 AM
Hi Kostadin,
Is this something on the product roadmap, for BIFF Export to one day support wrapping? Any idea if there is a fix in an upcoming release? We like the way BIFF doesn't give a warning when opening the file in Excel, so we prefer this format, but we really would like to control word wrapping.
Thanks,
Adam
Is this something on the product roadmap, for BIFF Export to one day support wrapping? Any idea if there is a fix in an upcoming release? We like the way BIFF doesn't give a warning when opening the file in Excel, so we prefer this format, but we really would like to control word wrapping.
Thanks,
Adam
0
Hi Adam,
The text wrapping is not implemented in the export engine which we are using and I am not sure whether this feature will be available. Nevertheless I will forward the request to our developers for further investigation on this matter.
Regards,
Kostadin
Telerik
The text wrapping is not implemented in the export engine which we are using and I am not sure whether this feature will be available. Nevertheless I will forward the request to our developers for further investigation on this matter.
Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Andrew
Top achievements
Rank 1
answered on 02 Jun 2014, 05:16 AM
BIFF export is really powerful and we have used it extensively for generating business reports, but there are a few limitations in regards to formatting which I'd really like to see addressed, such as wrapping and better cell formatting support in general.
Thanks guys!
Thanks guys!
0
Hello Andrew,
We are aware of those limitation and our developers will investigate them further. Nevertheless I am unable to provide you with information whether those features will be available or not.
Regards,
Kostadin
Telerik
We are aware of those limitation and our developers will investigate them further. Nevertheless I am unable to provide you with information whether those features will be available or not.
Regards,
Kostadin
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Mehmet
Top achievements
Rank 1
answered on 13 May 2015, 09:14 PM
Is there any update on adding the wrap function? It's the biggest feature missing in BIFF exporting.
0
Hello Mehmet,
Note that since Q3 2014 SP1 we introduced a manual text wrapping by using the ExportInfrastructure. More information can be found at the end of the following help article.
Regards,
Kostadin
Telerik
Note that since Q3 2014 SP1 we introduced a manual text wrapping by using the ExportInfrastructure. More information can be found at the end of the following help article.
Regards,
Kostadin
Telerik
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