How to provide title in .NET web Forms Olap Grid exported document ?
This KB illustrates that how to provide a title name to the worksheet in the OLAP Grid.
Solution
You can provide a title name to the worksheet in the OLAP Grid excel exported document by using the following code examples.
C#
protected void Page_Load(object sender, EventArgs e)
{
//Other code here
this.OlapClient1.OlapClientToolBar.ExportExcel += OlapClientToolBar_ExportExcel;
}
void OlapClientToolBar_ExportExcel(object sender, ExportExcelEventArgs e)
{
e.WorkSheetName = "Custom Name";
}
VB
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 'Other code here AddHandler Me.OlapClient1.OlapClientToolBar.ExportExcel, AddressOf OlapClientToolBar_ExportExcel End Sub Private Sub OlapClientToolBar_ExportExcel(ByVal sender As Object, ByVal e As ExportExcelEventArgs) e.WorkSheetName = "Custom Name" End Sub