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

SetColorOrGetNearest not working

Thread ID:





102747 Feb 28,2012 02:25 PM UTC Feb 29,2012 01:19 PM UTC ASP.NET Web Forms (Classic) 2
Tags: XlsIO
Administrator [Syncfusion]
Asked On February 28, 2012 02:25 PM UTC

I have a static class with several static methods and I'm trying to use SetColorOrGetNearest method of the IWorkbook interface but it's like it doesn't exists. My static class is inheriting from the IWorkbook interface but when I try to use the SetColorOrGetNearest method I keep getting the method doesn't exists. What am I doing wrong? I am using version of the Syncfusion.XlsIO.Web.dll

Thanks in advance

Kevin Clark
Replied On February 28, 2012 02:58 PM UTC

This can be disregarded...I figured it out, but I think the documentation on this can be improved greatly. Hopefully the code below will help others in the future

ExcelEngine ex = new ExcelEngine();
ex.Excel.Workbooks.Create(7); - creates a workbook with 7 sheets

IRange row = ex.Excel.Worksheets[i].Range["A3"];

row.CellStyle.ColorIndex = ex.Excel.Worksheets[i].Workbook.SetColorOrGetNearest(242, 242, 242);

Johnson Monohar M [Syncfusion]
Replied On February 29, 2012 01:19 PM UTC

Hi Kevin,

Thank you for your valuable information.

We assure to include the code snippet of SetColorOrGetNearest() method in our documentation.



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