In my function I have the following instructions:
grid.DataSource = dt
grid.DataBind()
Response.Clear()
Response.AddHeader("content-disposition", "attachment; filename=Soste.xls")
Response.AddHeader("Content-Type", "application/Excel")
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
Response.Charset = ""
Dim stringWrite As System.IO.StringWriter = New System.IO.StringWriter
Dim htmlWrite As New HtmlTextWriter(stringWrite)
grid.RenderControl(htmlWrite)
Dim html As String = stringWrite.ToString()
Dim pattern As String = "(\p{Sc})?"
Dim rgx As New System.Text.RegularExpressions.Regex(pattern)
html = rgx.Replace(html, "")
Response.Write(html)
HttpContext.Current.Response.[End]()
Where grid is a datagrid where I post the data to export.
On the PC it's all right, but when I try to export data to a tablet (android or apple), the file does not open.
I ask: you can do it open even on the mobile?
Many thanks to the response.