Ejemplo n.º 1
0
        /// <summary> Reads the ptg data from the array starting at the specified position
        ///
        /// </summary>
        /// <param name="data">the RPN array
        /// </param>
        /// <param name="pos">the current position in the array, excluding the ptg identifier
        /// </param>
        /// <returns> the number of bytes read
        /// </returns>
        public virtual int read(sbyte[] data, int pos)
        {
            index = IntegerHelper.getInt(data[pos], data[pos + 1]);

            name = nameTable.getName(index - 1);             // ilbl is 1-based

            return(4);
        }
Ejemplo n.º 2
0
        /**
         * Reads the ptg data from the array starting at the specified position
         *
         * @param data the RPN array
         * @param pos the current position in the array, excluding the ptg identifier
         * @return the number of bytes read
         */
        public int read(byte[] data, int pos)
        {
            try
            {
                index = IntegerHelper.getInt(data[pos], data[pos + 1]);

                name = nameTable.getName(index - 1);                 // ilbl is 1-based

                return(4);
            }
            catch (NameRangeException e)
            {
                throw new FormulaException(FormulaException.CELL_NAME_NOT_FOUND, string.Empty);
            }
        }