class RubyXL::Stylesheet
def register_number_format(format_code)
def register_number_format(format_code) self.number_formats ||= RubyXL::NumberFormats.new max_fmt_id = 163 (NumberFormats::DEFAULT_NUMBER_FORMATS + number_formats).each { |fmt| return fmt.num_fmt_id if fmt.format_code == format_code max_fmt_id = fmt.num_fmt_id if fmt.num_fmt_id > max_fmt_id } max_fmt_id += 1 number_formats << RubyXL::NumberFormat.new(:num_fmt_id => max_fmt_id, :format_code => format_code) return max_fmt_id end