473,287 Members | 3,240 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

export to excel problem with IPAddress in URL but working correct 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
Apr 2 '08 #1
0 1538

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Regnab | last post by:
I've got my code working so that it'll count the number of columns in the table and move across (eg Range A-P and then range Q-W). Problem is when I get to the end of the single letters and get...
2
by: Droopy | last post by:
Hi, I try to implement a reusable socket class to send and receive data. It seems to work but I have 2 problems : 1) I rely on Socket.Available to detect that the connection is closed (no...
6
by: Elena | last post by:
I'm trying to export data to an Excel worksheet. I can export the data in the cell values perfectly. I need the code to change a header and footer for the worksheet, not for the columns. Is...
14
by: bonehead | last post by:
Greetings, I'm using the DoCmd.TransferText method to export the results of a MS Access query to a csv file. The csv will then be used to load an Oracle table. In other systems such as TOAD...
3
by: Jerry Spence1 | last post by:
I have been looking at examples of code to create a simple TCP listener on a certain port. However they all start off with this line: Dim tcpListener As New TcpListener(portNumber) When I...
13
by: Hemant Sipahimalani | last post by:
The following piece of code is being used to export HTML to excel. HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this...
19
by: cj2 | last post by:
#1 Is there a quick way to export a datatable to an excel file? Or delimited file? #2 Where is the appropriate Microsoft monitored group to ask about writing reports in SQL Reporting services...
5
by: Reggie | last post by:
Hi and TIA! I have an export procedure that exports my data from my datagrids to excel. The problem is that I lose leading zero's cause excel removes them and doesn't treat them as text. Is it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.