def numeric val
        ostring = "%"
        strippedfmt = val.gsub(/\?/, '0').gsub(',','')
        prefix, decimals, sep, floats, expo, postfix=/(^[^\#0e].?)?([\#0]*)?(\.)?([\#0]*)?(e.?)?(.?[^\#0e]$)?/i.match(strippedfmt).captures
        ostring.prepend prefix.to_s
        if !decimals.nil? && decimals.size != 0
          if (eval decimals) == nil
            ostring += "##{decimals.size}"
          elsif (eval decimals) == 0
            ostring += decimals.size.to_s
          end
        else
          ostring += decimals
        end
        ostring += sep.to_s
        if !floats.nil? && floats.size != 0 # expo!!!
          ostring += ((floats.size.to_s) +"f")
        end
        if sep.nil? && floats.nil? || floats.size == 0
          ostring += "d"
        end
        ostring += (expo.to_s + postfix.to_s) #postfix '+' ?
        return ostring
      end
def numeric val
        ostring = "%"
        strippedfmt = val.gsub(/\?/, '0').gsub(',','')
        prefix, decimals, sep, floats, expo, postfix=/(^[^\#0e].?)?([\#0]*)?(\.)?([\#0]*)?(e.?)?(.?[^\#0e]$)?/i.match(strippedfmt).captures
        ostring.prepend prefix.to_s
        if !decimals.nil? && decimals.size != 0
          if (eval decimals) == nil
            ostring += "##{decimals.size}"
          elsif (eval decimals) == 0
            ostring += decimals.size.to_s
          end
        else
          ostring += decimals
        end
        ostring += sep.to_s
        if !floats.nil? && floats.size != 0 # expo!!!
          ostring += ((floats.size.to_s) +"f")
        end
        if sep.nil? && floats.nil? || floats.size == 0
          ostring += "d"
        end
        ostring += (expo.to_s + postfix.to_s) #postfix '+' ?
        return ostring
      end
Convert the excel-style number format to a ruby #Kernel::Format string and return that String.
 The conversion is internally done by regexp'ing 7 groups: prefix, decimals, separator, floats, exponential (E+)
 and postfix. Rational numbers ar not handled yet.
 @param [String] val an Excel number format string.
 @return [String] a rubyish Kernel::Format string.