Пример #1
0
        internal override void Dispose(bool disposing)
        {
            if (_comment != null)
            {
                _comment.Dispose();
                _comment = null;
            }

            if (_font != null)
            {
                _font.Dispose();
                _font = null;
            }

            if (_borders != null)
            {
                _borders.Dispose();
                _borders = null;
            }

            if (_columns != null)
            {
                _columns.Dispose();
                _columns = null;
            }

            if (_rows != null)
            {
                _rows.Dispose();
                _rows = null;
            }

            if (_entireColumn != null)
            {
                _entireColumn.Dispose();
                _entireColumn = null;
            }

            if (_entireRow != null)
            {
                _entireRow.Dispose();
                _entireRow = null;
            }

            if (_worksheet != null)
            {
                _worksheet.Dispose();
                _worksheet = null;
            }

            if (_application != null)
            {
                _application.Dispose();
                _application = null;
            }

            base.Dispose(disposing);
        }
Пример #2
0
        public void Move(Worksheet before = null, Worksheet after = null)
        {
            if (before != null && after != null)
            {
                throw new ArgumentException("You cannot specify both 'before' and 'after' when moving a worksheet");
            }


            InternalObject.GetType().InvokeMember("Move", System.Reflection.BindingFlags.InvokeMethod, null, InternalObject, new object[] { (before == null) ? System.Reflection.Missing.Value : before.InternalObject, (after == null) ? System.Reflection.Missing.Value : after.InternalObject });
        }