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.
Unfortunately, activation email could not send to your email. Please try again.

SetColorOrGetNearest not working

Thread ID:

Created:

Updated:

Platform:

Replies:

102747 Feb 28,2012 09:25 AM Feb 29,2012 08:19 AM ASP.NET Web Forms (Classic) 2
loading
Tags: XlsIO
Administrator [Syncfusion]
Asked On February 28, 2012 09:25 AM

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 9.103.0.20 version of the Syncfusion.XlsIO.Web.dll

Thanks in advance


Kevin Clark
Replied On February 28, 2012 09:58 AM

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 08:19 AM

Hi Kevin,

Thank you for your valuable information.

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

Thanks,
Johnson


CONFIRMATION

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.

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.

;