This project is read-only.

Create rectangle using XSSFSimpleShape

Jan 22, 2016 at 5:21 AM
How to make following code work? I got error like "The method or operation is not implemented."
Does this mean I can't draw rectangle for excel 2007 format by using XSSFSimpleShape?
XSSFDrawing drawingPatriach = (XSSFDrawing)sheet1.CreateDrawingPatriarch();
            XSSFClientAnchor a = new XSSFClientAnchor(0, 0, 0, 0, c, r, (c + 1), r + 1);
            XSSFSimpleShape rectangle = drawingPatriach.CreateSimpleShape(a);
            // Draw a rectangle.
            rectangle.ShapeType = (int)ShapeTypes.Rectangle;
            rectangle.SetFillColor(0, 255, 255);
Feb 1, 2016 at 8:02 AM
Instead of "rectangle.ShapeType =" you should use:
rectangle.SetShapeType( (int)ShapeTypes.Rectangle );
(ShapeType is POI enumeration.)