We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Can't run some of example codes!

Hello to everyone!

I have some problems with pieces of code which implies Color class

I receive this errors for code from here:

http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/colors-and-palette.html

The errors I receive:

Error 1: The type ‘System.Drawing.Color’ is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’

Error 2: The best overloaded method match for ‘Aspose.Cells.Workbook.ChangePalette(System.Drawing.Color, int)’ has some invalid arguments
Error 3: Argument ‘1’: cannot convert from 'System.Drawing.Color
Error 4: Cannot implicitly convert type 'System.Drawing.Color

I’m using these directives:

using System.Drawing;

using Aspose.Cells;


Any advices?



Hi,

The error indicates that you are missing a reference to System.Drawing, please add a reference to it.

Please see the screenshot below how to add an assembly reference.

Screenshot

Stupid me.
I found the dll from the hard disk and added using Add Reference by browsing the hard drive and that’s why it was not working.

Thanx. It’s working with your solution.