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. Image for the cookie policy date

SetColorOrGetNearest not working

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


2 Replies

KC Kevin Clark 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);




JM Johnson Monohar M Syncfusion Team 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.

Thanks,
Johnson


Loader.
Live Chat Icon For mobile
Up arrow icon