Articles in this section
Category / Section

How to set custom file name for excel sheet while exporting?

1 min read

This KB illustrates that how to set custom file name for excel sheet while exporting.

Solution:

You can set the file name for excel at the service end. Refer to the following code example.

C#

public void ExportOptions(Stream stream)
{
    olapGridHelper.ExportToExcel(DataManager, new StreamReader(stream).ReadToEnd(), "Valid Name.xls", HttpContext.Current.Response);
}

VB

Public Sub ExportOptions(ByVal stream As Stream)
olapGridHelper.ExportToExcel(DataManager, New StreamReader(stream).ReadToEnd(), "Valid Name.xls", HttpContext.Current.Response)
End Sub

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied