View Single Post
  #1 (permalink)  
Old 04-02-2008, 01:43 AM
mustaque mustaque is offline
Newbie
 
Join Date: Apr 2008
Posts: 3
Rep Power: 0
mustaque is on a distinguished road
Post export to excel problem with IPAddress in URL but working with localhost url

Hi All,

I am getting export to excel problem when I am giving IPAddress in URL, but it is working correct when am giving localhost and page name.

eg : when I am writing My machine IP address and aspx pagename like 192.xxx.xxx.xx/exporttoexcell.aspx then popup page is not working. the popup page is being closed automatically , and export to excel option is not comming.

for some reason when it opens within a scripted popup (js: window.open()), it flashes and then closes immediately without any excel trigger.


but when I am giving my machine name mustaque/exporttoexcell.aspx then popup page is working properly and export to excel is working . I am being unable to understand what may be the problem ,

I am writing here my code

// I am getting the value in sBody and exporting it to excel .

string sBody = cExcel.ExportToMSExcel(true, true, 2,false, false);
Response.Clear();

Response.Buffer = true; Response.Charset = "";
Response.AppendHeader("Content-Type", "application/vnd.ms-excel");

Response.AppendHeader("Content-disposition", "attachment; filename=AcHeadMaster.xls");
Response.Write(sBody);

Response.End();




please help me.

My OS is Vista . Dotnet vn 2.0

Thanks in Advance

Mustaque Ahmad

Software Engineer

Last edited by mustaque; 04-02-2008 at 02:06 AM. Reason: update
Reply With Quote

Sponsored Links