Hi,
I am presently using the Q! 2009 version of the Rad controls.
I have used the export to excel feature in my screen throught a link button on my screen.
when i export the file on button click the following set of actions are seen on the client side.
A standard IE file download pop up appears which asks whether file should be opened or saved.
If i say save it works fine.
If I say Open it gives the standard Microsoft Office Excel 2003 warning(Which is fine) saying the file you are trying to open, Default.aspx(Which is my page name and not the filename as specified in the previous pop up or my code) you are trying to open is in a different format than specified by the file extension.Verify that the file is not corrupted and is from a trusted source before opening the file.do you want to open the file now?
If i say yes it opens in excel with default.aspx.
If I say no again I get another excel 2003 warning saying you are trying to open <The_Actual_File_Name>, is in a different format than specified by the file extension.Verify that the file is not corrupted and is from a trusted source before opening the file.do you want to open the file now?
If I say yes it opens the file but if I say no again I once again get a File download warning with the options of Save and cancel.
What I want the Export to Excel to do is present the option of open /save once as before and on clicking open It should open the file in Excel 2003(Even if it gives the excel warning its fine as long as it is only once with the right name)
How can we go about this?
Attached below is my VB code for reference.
Protected Sub lnkExport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkExport.Click
If Not ddlDataCut.SelectedValue = "" Then
grid.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML
grid.ExportSettings.IgnorePaging = True
grid.ExportSettings.ExportOnlyData = True
grid.ExportSettings.FileName = ddlDataCut.SelectedItem.Text.Substring(0, ddlDataCut.SelectedItem.Text.LastIndexOf(".")) 'Gets the filename from dropdown
grid.MasterTableView.ExportToExcel
End If
End Sub
And this is my ASP code for the control i use
<asp:LinkButton ID="lnkExport" runat="server" Text="Export to Excel File (.Xls)"></asp:LinkButton>
I am presently using the Q! 2009 version of the Rad controls.
I have used the export to excel feature in my screen throught a link button on my screen.
when i export the file on button click the following set of actions are seen on the client side.
A standard IE file download pop up appears which asks whether file should be opened or saved.
If i say save it works fine.
If I say Open it gives the standard Microsoft Office Excel 2003 warning(Which is fine) saying the file you are trying to open, Default.aspx(Which is my page name and not the filename as specified in the previous pop up or my code) you are trying to open is in a different format than specified by the file extension.Verify that the file is not corrupted and is from a trusted source before opening the file.do you want to open the file now?
If i say yes it opens in excel with default.aspx.
If I say no again I get another excel 2003 warning saying you are trying to open <The_Actual_File_Name>, is in a different format than specified by the file extension.Verify that the file is not corrupted and is from a trusted source before opening the file.do you want to open the file now?
If I say yes it opens the file but if I say no again I once again get a File download warning with the options of Save and cancel.
What I want the Export to Excel to do is present the option of open /save once as before and on clicking open It should open the file in Excel 2003(Even if it gives the excel warning its fine as long as it is only once with the right name)
How can we go about this?
Attached below is my VB code for reference.
Protected Sub lnkExport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkExport.Click
If Not ddlDataCut.SelectedValue = "" Then
grid.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML
grid.ExportSettings.IgnorePaging = True
grid.ExportSettings.ExportOnlyData = True
grid.ExportSettings.FileName = ddlDataCut.SelectedItem.Text.Substring(0, ddlDataCut.SelectedItem.Text.LastIndexOf(".")) 'Gets the filename from dropdown
grid.MasterTableView.ExportToExcel
End If
End Sub
And this is my ASP code for the control i use
<asp:LinkButton ID="lnkExport" runat="server" Text="Export to Excel File (.Xls)"></asp:LinkButton>