This project has moved and is read-only. For the latest updates, please go here.

[Merge Request]Adding the possibility to obtain the width and height of an ExcelDrawing

Sep 20, 2016 at 9:51 AM
Edited Sep 20, 2016 at 9:55 AM
Hi guys,

I'm using EPPlus to get some information from an Excel spreadsheet.

One of this information is the size of an Excel shape. For inexplicable reasons I can only see the size of the width and height of an ExcelDrawing object while debugging using this fields:

protected internal int _width
and
protected internal int _height

I ended up using reflection within an extension method to get both values at runtime, which works like a charm. But we all know, that reflection comes with a bit of an overhead.

Long story short - please add the following two read-only properties to the ExcelDrawing class:
        /// <summary>
        /// Returns the height of this drawing. This field is read-only.
        /// </summary>
        public int GetHeigth
        {
            get
            {
                return this._height;
            }
        }

        /// <summary>
        /// Returns the width of this drawing. This field is read-only.
        /// </summary>
        public int GetWidth
        {
            get
            {
                return this._width;
            }
        }
I would have created a proper merge request, but I'm unable to install Mercurial on my device.

Kind regards
Baccata