Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

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

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