473,467 Members | 1,603 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Downloading an Excel File

68 New Member
Hi.

I want to download an Excel file from the server and am using the following code.

Expand|Select|Wrap|Line Numbers
  1. <input type=button value="Click To Download" onClick="location.href='Logs.xls'">
  2.  
On clicking this button, I get the following Error.

exec of /tmp_mnt/org/www/cgidir/dev_cgitools/Codeplug/Logs.xls failed (Exec format error)

I read about Exec Formet Error, and found that Excel seems to be an invalid format. I have no clue why the excel file is not working for this particular operation because, it works fine while uploading data in the same excel file.

Any help is appreciated.


Thanks,

Ravi
Dec 15 '08 #1
2 5008
clain
79 New Member
is the excel file in the same location where the page is??? else give the correct path... also check if JavaScript is enabled..
Dec 15 '08 #2
AricC
1,892 Recognized Expert Top Contributor
If you want to download the Excel file why are you trying opening it in the same window? Why wouldn't you just use an anchor to create a link to the page? I tried your example on my local machine and it worked fine for me.
Dec 18 '08 #3

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

Similar topics

1
by: Marilyn Chalmers | last post by:
I am a newbie at HTML and web authoring and have a problem I cannot figure out. If I provide a link like this in my page and the user clicks on the link the document file is downloaded and...
7
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a...
0
by: Sathya | last post by:
Hi Am using an ASP.NET website. i have an excel template stored in a folder in the server. the excel template already has some data inside. i need to add some more data to the excel sheet...
3
by: Jocelyn Duhaylungsod | last post by:
I have been getting the following server errors sporadically while downloading excel, csv or xml file. Internet Explorer cannot download <file name> from <IP address> "The server returned an...
1
by: ksskumar2000 | last post by:
Hi Friends, What I want: If the user click a hyperlink, I have to download a .CSV file into the users machine. What I tried: <asp:HyperLink id=HyperLink1 runat="server"...
4
by: Kevin R. | last post by:
Greetings, I have the following code that attempts to download an excel file: System.Web.HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"; ...
0
by: ed | last post by:
Hello All. I have seen many posts slightly similar to this question with no answer. Maybe you have some FAQs or something, sorry if I looks repetitive. Here is my Problem: In my...
2
by: Radha Raman | last post by:
hi I am facing problem in downloading excel sheet with macros. So i decide to create a EXE for that. But how to create that EXE for downloading excel file, i don't know. Plz help me
1
by: Muddasir | last post by:
Hello everyone. I am facing problem in downloading .xls file. I generate report and save data in excel sheet on server. and once user click the 'save data in excel format', an excel sheet is...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.