Exemplo n.º 1
0
        public void SetValue(string cellReference, object value)
        {
            #region Validations

            if (cellReference == null)
            {
                throw new ArgumentNullException(nameof(cellReference));
            }

            #endregion

            var cell = GetCell(cellReference);
            cell.Value2 = XlsType.FromValue(value);
        }
Exemplo n.º 2
0
        public object GetValue(Type type, string cellReference)
        {
            #region Validations

            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }

            if (cellReference == null)
            {
                throw new ArgumentNullException(nameof(cellReference));
            }

            #endregion

            var cell = GetCell(cellReference);

            return(XlsType.ToValue(type, cell.Value2));
        }