Exporting Excel with custom shape objects

Posted by: mkiran88 on 8 September 2017, 3:22 pm EST

  • Posted 8 September 2017, 3:22 pm EST

    Hi,
    I have designed a custom shape class as follow.
    [Serializable]
    class RectangleWithCircle : PSShape, ISerializable
    {
    private Size ellSize = new Size(12, 12);
    public RectangleWithCircle()
    {
    this.Size = new Size(20,20);
    }

    public override void OnPaint(System.Drawing.Graphics g, System.Drawing.Rectangle rectInput)
    {
    // base.OnPaint(g, rectInput);
    g.DrawRectangle(Pens.Black, rectInput);
    Rectangle ellipseRest = new System.Drawing.Rectangle(rectInput.Location.X + (rectInput.Width - ellSize.Width) / 2,
    rectInput.Location.Y + (rectInput.Height - ellSize.Height) / 2,ellSize.Width,ellSize.Height);
    g.DrawEllipse(Pens.Black, ellipseRest);

    }
    }

    When I add my custom shape object to a sheet it is displaying on the sheet but when I export it to excel.It is not exporting into excel.So what is the solution for this.
  • Replied 8 September 2017, 3:22 pm EST

    Hi,

    Sorry, only built-in shapes and camera shapes can be exported to Excel.

    -Gina
  • Replied 8 September 2017, 3:22 pm EST

    Hi,
    When you are providing custom controls. It should have a flexibility to serialize custom shapes into excel as well.

    Kiran
  • Replied 8 September 2017, 3:22 pm EST

    Hello,

    We are escalating this as an enhancement request. We will update you once we hear anything from our concerned team.

    Tracking id for your issue is:- #146463

    Thanks,
    Reeva
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels