how to add a image to excel document?

Technical support for Spire.XLS

Moderators: iceblue support, Flash, Manager

how to add a image to excel document?

Postby MichealRike » Sun Sep 23, 2007 12:03 pm

Hi,

Spire.XLS is so powerful, a great component.
I have a question , how to add a image to excel document?

Thankyou,

Democrat
MichealRike
 
Posts: 1
Joined: Sun Sep 23, 2007 11:55 am

Postby Flash » Sun Sep 23, 2007 12:12 pm

Hello,

Thank you for interesting in our product.

Try to using following code,

Code: Select all
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets[0];

sheet.Pictures.Add(1,1,@"..\..\..\..\..\..\Data\day.jpg");

workbook.SaveToFile("sample.xls");
User avatar
Flash
 
Posts: 56
Joined: Thu Jun 29, 2006 2:34 pm


Return to Spire.XLS

Who is online

Users browsing this forum: No registered users and 0 guests