i am using an add-on component called eXport.net to export data to an excel worksheet. the sheet must first be saved on the webserver before naything can be done with it. i then include some inline javascript to open the excel spresdsheet in a new window. everything works fine up until the opening of the file in a new window. the file is created on the webserver but will not open up in a new browser window for me. below is the code i am using:
SqlDataAdapter da;
DataSet ds;
ds = new DataSet();
da = new SqlDataAdapter("stpDEBgetInsuranceMailMerge", strConnection);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.Fill(ds, "SSRFADD");
eXportNET SF = new eXportNET();
String strFileName;
StringBuilder sb = new StringBuilder();
SF.FileType = "XLS";
SF.SavePath = Server.MapPath("");
strFileName = SF.CreateFileFromDataset(ds);
strFileName = strFileName.Substring(strFileName.LastIndexOf("\\")+1);
sb.Append("<SCRIPT>");
sb.Append("window.open(" + strFileName + ");");
sb.Append("</SCRIPT>");
Response.Write(sb.ToString());
this works from within visual studio when i build and browse but the minute i copy and paste the link into a browser window and click on Export Report button i get the file is created but nothing happens -(no window opended up showing the file)
SqlDataAdapter da;
DataSet ds;
ds = new DataSet();
da = new SqlDataAdapter("stpDEBgetInsuranceMailMerge", strConnection);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.Fill(ds, "SSRFADD");
eXportNET SF = new eXportNET();
String strFileName;
StringBuilder sb = new StringBuilder();
SF.FileType = "XLS";
SF.SavePath = Server.MapPath("");
strFileName = SF.CreateFileFromDataset(ds);
strFileName = strFileName.Substring(strFileName.LastIndexOf("\\")+1);
sb.Append("<SCRIPT>");
sb.Append("window.open(" + strFileName + ");");
sb.Append("</SCRIPT>");
Response.Write(sb.ToString());
this works from within visual studio when i build and browse but the minute i copy and paste the link into a browser window and click on Export Report button i get the file is created but nothing happens -(no window opended up showing the file)