473,398 Members | 2,427 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,398 software developers and data experts.

ASP - Excel - Images

blyxx86
256 100+
I was having issues with exporting an ASP table that included images. I have since found a solution for this error, and hope that what I have found becomes useful for some others on this site.

At the top of the page:
Expand|Select|Wrap|Line Numbers
  1. <%
  2. Response.ContentType = "application/vnd.ms-excel"
  3. Response.AddHeader "Content-Disposition", "attachment; filename=MyReport" & ".xls"
  4. %>
  5.  
Then the part that had the image in the main HTML/ASP script used to look like this:
Expand|Select|Wrap|Line Numbers
  1. <img src="/images/custlogo/<%=rs("LogoName")%>" title="<%=rs("Customer")%>"/>
  2.  
Now I replaced the relative path with the full path:
Expand|Select|Wrap|Line Numbers
  1. <img src="http://www.mysite.com/images/custlogo/<%=rs("LogoName")%>" title="<%=rs("Customer")%>"/>
  2.  
After making this change it fixed the problem of showing up a 'blank' placeholder in the excel spreadsheet.

I hope this helps fix any issues that others may have encountered. :)
Jan 22 '08 #1
0 1083

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

Similar topics

2
by: Balamurali C | last post by:
Hi All I'm having one problem, since im debuging this last one week I'm not able to do. Problem: In my webage I have two Frames(top & bottom) in the top frame I'm displaying some...
0
by: jhgonzales | last post by:
The datagrid is exporting but without the images. When the file is downloaded, it seems that the excel file was supposed to have the images because they appear as "broken" image in the file. ...
0
by: Jedawi | last post by:
Hi, would anyone be able to point me in the right direction on how to import an image (.jpg file) into an Excel worksheet using VB.Net and Option Strict On. This should be straight forward...
2
by: Yaseen D M | last post by:
I have aspx page which contains some gif, jpg and png images. PNG image is generated dynamically. This file is basically a graph image. The problem i am facing in exporting these images to word,...
1
by: joy | last post by:
Hi. I have a datagrid which displays images in cells. User wants to download the grid data as excel file. Now, if datagrid contains only data, it is fine. But if it contains some images, images...
1
by: edwinparker | last post by:
Hi, I'm trying to convert a gridview to an excel report and have one small hang up. So far I've been able to create my gridview and export it to excel ok, but in my gridview I have an image. The...
1
roswara
by: roswara | last post by:
Dear all, Currently, I am working on a project to make a web-based application using ASP 2.0 and C#. This application will ask user to input for an excel file which has graphs in it. Then the...
6
by: Eddie | last post by:
Hi all, I am displaying a number of reports, and giving the users an option to display them on the web or download them to Excel. If they want the Excel file, I just use the PHP header command...
0
by: JRough | last post by:
Hi, I have a page with a form that is included into a php page. It has some php variables which are headers based on the user choices. In the form I will send some mysql data columns but right...
2
by: Kevin G. | last post by:
Hello, I'm exporting an ASP page to Excel using 'Response.ContentType = "application/vnd.ms-excel"' and it is working fine for the most part except the particular page I'm exporting has images,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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...

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.