We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Center Images

Thread ID:





82007 May 27,2009 01:23 PM UTC Jun 3,2009 12:19 PM UTC WinForms 1
Tags: XlsIO
Administrator [Syncfusion]
Asked On May 27, 2009 01:23 PM UTC

How do you center images?


//this inserts the image
excel.InsertImage(imageFileName, 1, 1);

IRange logoRange = excel.GetRange("A1", "E1");

//Trying to center the image but this does not work
logoRange.HorizontalAlignment = ExcelHAlign.HAlignCenter;

The Images appears in cell 1
I want it in the center of the merged cells.

Any ideas?


Geetha M [Syncfusion]
Replied On June 3, 2009 12:19 PM UTC


Thank you for your interest in Syncfusion products.

It is not possible to center an image using IRange.HorizontalAlignment. Only text content can be aligned. Also it is not possible to center the image in MS Excel.

Please let me know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon