Sunday

IE7 opening excel files.

may not be working , check out : http://blogs.msdn.com/excel/archive/2006/09/26/771221.aspx



Public Shared Sub ExportToExcel(ByVal objViewcreator As ViewCreatorGeneral, ByVal dtFromDatabase As DataTable, ByVal inColumnArrList As ArrayList, ByVal report_header As String, ByVal originalSort As String)

System.Web.HttpContext.Current.Response.ClearContent()
System.Web.HttpContext.Current.Response.ClearHeaders()
System.Web.HttpContext.Current.Response.Charset = ""
System.Web.HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "inline; filename=report.xls")
System.Web.HttpContext.Current.Response.AddHeader("Pragma", " private")
System.Web.HttpContext.Current.Response.AddHeader("Cache-control", " private, must-revalidate")

'writing tab separated stuff here
Dim tabFile As String = "my tab separted cols crlf separeted rows"
System.Web.HttpContext.Current.Response.BinaryWrite(Encoding.GetBytes(tabFile))

System.Web.HttpContext.Current.Response.End()
End Sub


more...

No comments:

imagemagic add text to image

rem different types of text annotations on existing images rem cyan yellow orange gold rem -gravity SouthWest rem draw text and anno...