Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Sat Jan 15, 2011 9:59 am

Hi all,

is ther somebody who can help me with placing a logo into an excel sheet. I am ablo to load the picture and put it in a cel. However the placement is not exact enough. is there a way to place this logo on exact coordinates? it places it now by default in the left top corner of the cel

Posts: 2
Joined: Fri Jan 14, 2011 5:42 pm

Mon Jan 17, 2011 11:26 am

Thanks for your inquiry.
The properties LeftColumnOffset and TopRowOffset should be what you want.
Code: Select all
            Spire.Xls.ExcelPicture picture
                = worksheet.Pictures.Add(Image.FromFile(@"logo.gif"), "logo");
            picture.TopRow = 2;
            picture.LeftColumn = 3;
            picture.LeftColumnOffset = 10;
            picture.TopRowOffset = 20;

But it looks like there is a bug and these two properties do not work, we will fix this bug in the next release. After fixing it, we will send you a mail.
We are sorry for taht.
Technical Support / Developer,
e-iceblue Support Team
User avatar

Posts: 180
Joined: Mon Nov 08, 2010 3:11 pm

Return to Spire.XLS