class Axlsx::NumVal
This class specifies data for a particular data point.
Attributes
format_code[R]
A string representing the format code to apply. For more information see see the SpreadsheetML numFmt element’s (§18.8.30) formatCode attribute. @return [String]
Public Class Methods
new(options={})
click to toggle source
creates a new NumVal
object @option options [String] formatCode @option options [Integer] v
Calls superclass method
# File lib/axlsx/drawing/num_val.rb, line 14 def initialize(options={}) @format_code = "General" super(options) end
Public Instance Methods
format_code=(v)
click to toggle source
@see format_code
# File lib/axlsx/drawing/num_val.rb, line 20 def format_code=(v) Axlsx::validate_string(v) @format_code = v end
to_xml_string(idx, str = "")
click to toggle source
serialize the object
# File lib/axlsx/drawing/num_val.rb, line 26 def to_xml_string(idx, str = "") Axlsx::validate_unsigned_int(idx) str << ('<c:pt idx="' << idx.to_s << '" formatCode="' << format_code << '"><c:v>' << v.to_s << '</c:v></c:pt>') end