Ejemplo n.º 1
0
        /** Creates new ErrPtg */

        public ErrPtg(int errorCode)
        {
            if (!HSSFErrorConstants.IsValidCode(errorCode))
            {
                throw new ArgumentException("Invalid error code (" + errorCode + ")");
            }
            field_1_error_code = errorCode;
        }
Ejemplo n.º 2
0
        /**
         * Converts error codes to text.  Handles non-standard error codes OK.
         * For debug/test purposes (and for formatting error messages).
         * @return the String representation of the specified Excel error code.
         */
        public static String GetText(int errorCode)
        {
            if (HSSFErrorConstants.IsValidCode(errorCode))
            {
                return(HSSFErrorConstants.GetText(errorCode));
            }
            // It is desirable to make these (arbitrary) strings look clearly different from any other
            // value expression that might appear in a formula.  In Addition these error strings should
            // look Unlike the standard Excel errors.  Hence tilde ('~') was used.
            switch (errorCode)
            {
            case CIRCULAR_REF_ERROR_CODE: return("~CIRCULAR~REF~");

            case FUNCTION_NOT_IMPLEMENTED_CODE: return("~FUNCTION~NOT~IMPLEMENTED~");
            }
            return("~non~std~err(" + errorCode + ")~");
        }
Ejemplo n.º 3
0
 public override String ToFormulaString()
 {
     return(HSSFErrorConstants.GetText(HSSFErrorConstants.ERROR_REF));
 }
Ejemplo n.º 4
0
 public String ToFormulaString(IFormulaRenderingWorkbook book)
 {
     return(ExternSheetNameResolver.PrependSheetName(book, field_1_index_extern_sheet,
                                                     HSSFErrorConstants.GetText(HSSFErrorConstants.ERROR_REF)));
 }
Ejemplo n.º 5
0
 public override String ToFormulaString()
 {
     return(HSSFErrorConstants.GetText(field_1_error_code));
 }