Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default I generate excel file from c# & want to display image in it

We have a C# application that generates Excel files and includes data in the
files based upon the "account" that the user selects. It has worked fine,
but now we want to insert an image (PNG file) into one of the cells. I am
able to create a hyperlink to the picture, but the image itself does not
appear on the Excel file (if I click on the cell it opens a browser window
and displays the image by itself, but it does not appear in the Excel file).
To create the Excel file, we create a large XML string formatted for Excel,
then write it to Excel using System.Web.HttpContext (setting the ContentType
= "application/vnd.ms-excel").





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default I generate excel file from c# & want to display image in it


how about using this?!

myApplication.Rows.Worksheet.SetBackgroundPicture( @"C:\Documents and
Settings\All Users\Documents\My Pictures\Sample Pictures\blue hills.jpg");

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default I generate excel file from c# & want to display image in it


Thanks for the post, but we want to insert a small logo into one cell, not
create a watermark on the sheet.



"NA_AB" wrote:


how about using this?!

myApplication.Rows.Worksheet.SetBackgroundPicture( @"C:\Documents and
Settings\All Users\Documents\My Pictures\Sample Pictures\blue hills.jpg");

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display image thumbnails in Excel cells Dr. Strangelove Excel Discussion (Misc queries) 6 February 2nd 10 08:06 PM
Excel To Display image from the Hyperlink Julie Excel Discussion (Misc queries) 0 July 11th 07 08:00 PM
Excel 2003 - Image Display problems Ken Cooper Excel Programming 1 July 20th 06 11:57 AM
VBA to display image on a form - image is defined in Range Name Tan Excel Programming 4 May 17th 06 03:37 PM
HOW TO DISPLAY DIFFERENT IMAGES IN EXCEL USING IMAGE CONTROL? [email protected] Excel Programming 4 October 6th 05 03:11 AM


All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"