How to add new autoshape to a worksheet ?

I'd like to add new autoshape to a worksheet. I haven't found anything like worksheet.Shapes.AddAutoShape() or a way to modify ShapeType to ExcelShapeType.AutoShape.

Thanks.

Visual Studio 2005, Essential Studio 4.3.0.30.

1 Reply

MW Melba Winshia Syncfusion Team March 26, 2007 05:04 AM UTC

Hi Petr,

Thanks for your interest in Essential XlsIO.

Issue 1: (Add new autoshape)
-------

Currently it is not possible to add new autoshape to a worksheet. Already we have a feature request regarding this issue. Here is the feature request link to keep track of the details

http://www.syncfusion.com/support/features/xlsio/Default.aspx?ToDo=view&questId=1419

Issue 2:(Modify Shapes)
------

It is possible to modify shapes by using the following the code snippets. But the properties [Fill, Line etc] are only added in our latest version 4.4. Could you please upgrade to our latest version?

// Read the shape
IShape shape=sheet.Shapes[0];

// Format the Shape
shape.Fill.ForeColor = Color.Red;
shape.Line.ForeColorIndex = ExcelKnownColors.Yellow;
shape.Line.Style = ExcelShapeLineStyle.Line_Thick_Thin;
shape.Line.Weight = 3;
shape.Line.BeginArrowHeadStyle= ExcelShapeArrowStyle.LineArrowOpen;
shape.Line.EndArrowHeadStyle = ExcelShapeArrowStyle.LineArrowOpen;
shape.Line.BeginArrowheadLength = ExcelShapeArrowLength.ArrowHeadMedium;
shape.Line.EndArrowheadLength =ExcelShapeArrowLength.ArrowHeadLong;

Here is the sample for your reference:

http://websamples.syncfusion.com/samples/XlsIO.Windows/F58505/main.htm

Kindly let me know if you have any other questions.

Regards,
Melba

Loader.
Up arrow icon