Problem with styles

hi,

I am having some trouble working with style object.

the code part giving error is as follows:

int styleIndex = Ex.Styles.Add();

Style style1 = Ex.Styles[styleIndex]; //(line 155)

style1.Font.Size = “16”; //(line 157)

==============
and the error during build solution/compilation is as follows:

c:\inetpub\wwwroot\AsposeExcel\import2.aspx.cs(155): ‘Style’ is an ambiguous reference

c:\inetpub\wwwroot\AsposeExcel\import2.aspx.cs(157): The type or namespace name ‘style1’ could not be found (are you missing a using directive or an assembly reference?)

=============

i am using aspose.Excel reference…which additional reference do I need for this?

Please let me know,

thanks,
kamini

Hi Kamini,

Please change your code to:

int styleIndex = Ex.Styles.Add();

Aspose.Excel.Style style1 = Ex.Styles[styleIndex]; //(line 155)

style1.Font.Size = 16; //(line 157)