How can we solve?
------ Solution ---------------------------------------- ----
make sure your website a txt or jpg files can be accessed. If this will not work, then do not talk about certain requirements for the more advanced.
------ Solution ---------------------------------------- ----
1L you this is certainly untenable, others have tested IE6 is open it is certainly OK what other browsers can detect rogue software that fundamentally certificate is nonsense, you To how a rogue can make you link directly export EXCEL will produce not inernet yet.
Internet Explorer can not download ... XXX from XXX. . It is not clear how you did not access permissions to download excel it?
------ For reference only -------------------------------------- -
first use other browsers look okay.
If it is https, inspection certificate. Also see if the computer is not infected with the 360 and other rogue software.
------ For reference only -------------------------------------- -
continue tangled last week's issue
string strModelFile = "model / OrganQueryList.htm";
string strOutputFile = string.Format ("output / {0} {1}. xls", ; user.OrgCountyId, DateTime.Now.ToString ("yyyyMMddHHmmss"));
StatHelper.DataSetToExcel (dsMyds, strModelFile, strOutputFile);
/ / File Output
Response.Clear ();
Response.AppendHeader ("Content-Disposition", "attachment; filename =" + strOutputFile);
Response.ContentType = "application / ms-excel";
System.IO.FileStream fs = System.IO.File.Open (MapPath (strOutputFile), System.IO.FileMode.Open);
byte [] buffer = new byte [fs.Length];
fs.Read (buffer, 0, buffer.Length);
fs.Close ();
System.IO.File.Delete (MapPath (strOutputFile));
Response.BinaryWrite (buffer);
Response.End ();
public static bool DataSetToExcel (DataSet ds, string TemplateFilePath, string ToFileName)
{
string TemplateContent = DataSetToString (ds, TemplateFilePath);
/ / Save the file
FileStream fs = new FileStream (HttpContext.Current.Server.MapPath (ToFileName), FileMode.Create);
StreamWriter sw = new StreamWriter (fs);
sw.Write (TemplateContent);
sw.Flush ();
sw.Close ();
fs.Close ();
return true;
}
IE8, IE9, chrome down no problem, that is IE6 not
------ For reference only ---------------------- -----------------
make sure your website a txt or jpg files can be accessed. If this will not work, then do not talk about certain requirements for the more advanced.
I excel in place temporary files folder output decentralization of a picture, you can open
------ For reference only ---------------- -----------------------
finally found the problem, export excel to write a page that inherits from a base class, the base class to override the OnLoad method, in which the cache is disabled
没有评论:
发表评论