diff options
Diffstat (limited to 'doc/Axlsx/Cell.html')
| -rw-r--r-- | doc/Axlsx/Cell.html | 333 |
1 files changed, 148 insertions, 185 deletions
diff --git a/doc/Axlsx/Cell.html b/doc/Axlsx/Cell.html index 574297f4..59403b4a 100644 --- a/doc/Axlsx/Cell.html +++ b/doc/Axlsx/Cell.html @@ -97,22 +97,20 @@ <div class="note notetag"> <strong>Note:</strong> - <div class='inline'><p> -The recommended way to generate cells is via Worksheet#add_row -</p> + <div class='inline'> +<p>The recommended way to generate cells is via Worksheet#add_row</p> </div> </div> -<p> -A cell in a worksheet. Cell stores inforamation requried to serialize a + +<p>A cell in a worksheet. Cell stores inforamation requried to serialize a single worksheet cell to xml. You must provde the Row that the cell belongs to and the cells value. The data type will automatically be determed if you do not specify the :type option. The default style will be applied if you -do not supply the :style option. Changing the cell’s type will recast -the value to the type specified. Altering the cell’s value via the -property accessor will also automatically cast the provided value to the -cell’s type. -</p> +do not supply the :style option. Changing the cell’s type will recast the +value to the type specified. Altering the cell’s value via the property +accessor will also automatically cast the provided value to the cell’s +type.</p> </div> @@ -122,9 +120,8 @@ cell’s type. <div class="examples"> <h3>Examples:</h3> - <h4><div class='inline'><p> -Manually creating and manipulating Cell objects -</p> + <h4><div class='inline'> +<p>Manually creating and manipulating Cell objects</p> </div></h4> <pre class="example code"><span class='ws identifier id'>ws</span> <span class='assign token'>=</span> <span class='Workbook constant id'>Workbook</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='comment val'># This is the simple, and recommended way to create cells. Data types will automatically be determined for you.</span> @@ -176,9 +173,8 @@ Manually creating and manipulating Cell objects - <span class="summary_desc"><div class='inline'><p> -The row this cell belongs to. -</p> + <span class="summary_desc"><div class='inline'> +<p>The row this cell belongs to.</p> </div></span> </li> @@ -203,9 +199,8 @@ The row this cell belongs to. - <span class="summary_desc"><div class='inline'><p> -The index of the cellXfs item to be applied to this cell. -</p> + <span class="summary_desc"><div class='inline'> +<p>The index of the cellXfs item to be applied to this cell.</p> </div></span> </li> @@ -230,9 +225,8 @@ The index of the cellXfs item to be applied to this cell. - <span class="summary_desc"><div class='inline'><p> -The cell’s data type. -</p> + <span class="summary_desc"><div class='inline'> +<p>The cell’s data type.</p> </div></span> </li> @@ -257,9 +251,8 @@ The cell’s data type. - <span class="summary_desc"><div class='inline'><p> -The value of this cell. -</p> + <span class="summary_desc"><div class='inline'> +<p>The value of this cell.</p> </div></span> </li> @@ -294,9 +287,8 @@ The value of this cell. - <span class="summary_desc"><div class='inline'><p> -Cast the value into this cells data type. -</p> + <span class="summary_desc"><div class='inline'> +<p>Cast the value into this cells data type.</p> </div></span> </li> @@ -318,9 +310,8 @@ Cast the value into this cells data type. - <span class="summary_desc"><div class='inline'><p> -Determines the cell type based on the cell value. -</p> + <span class="summary_desc"><div class='inline'> +<p>Determines the cell type based on the cell value.</p> </div></span> </li> @@ -342,9 +333,8 @@ Determines the cell type based on the cell value. - <span class="summary_desc"><div class='inline'><p> -converts the column index into alphabetical values. -</p> + <span class="summary_desc"><div class='inline'> +<p>converts the column index into alphabetical values.</p> </div></span> </li> @@ -366,9 +356,8 @@ converts the column index into alphabetical values. - <span class="summary_desc"><div class='inline'><p> -The index of the cell in the containing row. -</p> + <span class="summary_desc"><div class='inline'> +<p>The index of the cell in the containing row.</p> </div></span> </li> @@ -392,9 +381,8 @@ The index of the cell in the containing row. - <span class="summary_desc"><div class='inline'><p> -A new instance of Cell. -</p> + <span class="summary_desc"><div class='inline'> +<p>A new instance of Cell.</p> </div></span> </li> @@ -416,9 +404,8 @@ A new instance of Cell. - <span class="summary_desc"><div class='inline'><p> -The alpha(column)numeric(row) reference for this sell. -</p> + <span class="summary_desc"><div class='inline'> +<p>The alpha(column)numeric(row) reference for this sell.</p> </div></span> </li> @@ -440,9 +427,8 @@ The alpha(column)numeric(row) reference for this sell. - <span class="summary_desc"><div class='inline'><p> -The absolute alpha(column)numeric(row) reference for this sell. -</p> + <span class="summary_desc"><div class='inline'> +<p>The absolute alpha(column)numeric(row) reference for this sell.</p> </div></span> </li> @@ -464,9 +450,8 @@ The absolute alpha(column)numeric(row) reference for this sell. - <span class="summary_desc"><div class='inline'><p> -Serializes the cell. -</p> + <span class="summary_desc"><div class='inline'> +<p>Serializes the cell.</p> </div></span> </li> @@ -487,9 +472,8 @@ Serializes the cell. </p><div class="docstring"> <div class="discussion"> - <p> -A new instance of Cell -</p> + +<p>A new instance of Cell</p> </div> @@ -508,9 +492,8 @@ A new instance of Cell — - <div class='inline'><p> -The row this cell belongs to. -</p> + <div class='inline'> +<p>The row this cell belongs to.</p> </div> </li> @@ -527,9 +510,8 @@ The row this cell belongs to. — - <div class='inline'><p> -The value associated with this cell. -</p> + <div class='inline'> +<p>The value associated with this cell.</p> </div> </li> @@ -546,9 +528,8 @@ The value associated with this cell. — - <div class='inline'><p> -a customizable set of options -</p> + <div class='inline'> +<p>a customizable set of options</p> </div> </li> @@ -571,10 +552,9 @@ a customizable set of options <span class="default"> </span> - — <div class='inline'><p> -The intended data type for this cell. If not specified the data type will -be determined internally based on the vlue provided. -</p> + — <div class='inline'> +<p>The intended data type for this cell. If not specified the data type will +be determined internally based on the vlue provided.</p> </div> </li> @@ -584,10 +564,9 @@ be determined internally based on the vlue provided. <span class="default"> </span> - — <div class='inline'><p> -The index of the cellXfs item to be applied to this cell. If not specified, -the default style (0) will be applied. -</p> + — <div class='inline'> +<p>The index of the cellXfs item to be applied to this cell. If not specified, +the default style (0) will be applied.</p> </div> </li> @@ -646,9 +625,8 @@ the default style (0) will be applied. </p><div class="docstring"> <div class="discussion"> - <p> -The row this cell belongs to. -</p> + +<p>The row this cell belongs to.</p> </div> @@ -703,9 +681,8 @@ The row this cell belongs to. </p><div class="docstring"> <div class="discussion"> - <p> -The index of the cellXfs item to be applied to this cell. -</p> + +<p>The index of the cellXfs item to be applied to this cell.</p> </div> @@ -770,26 +747,23 @@ The index of the cellXfs item to be applied to this cell. <div class="note notetag"> <strong>Note:</strong> - <div class='inline'><p> -If the value provided cannot be cast into the type specified, type is -changed to :string and the following logic is applied. -</p> -<pre class="code"> - <span class='symbol val'>:string</span> <span class='to identifier id'>to</span> <span class='symbol val'>:integer</span> <span class='or or kw'>or</span> <span class='symbol val'>:float</span><span class='comma token'>,</span> <span class='type identifier id'>type</span> <span class='coversions identifier id'>coversions</span> <span class='always identifier id'>always</span> <span class='return return kw'>return</span> <span class='integer val'>0</span> <span class='or or kw'>or</span> <span class='integer val'>0</span><span class='integer val'>.0</span> - <span class='symbol val'>:string</span><span class='comma token'>,</span> <span class='symbol val'>:integer</span><span class='comma token'>,</span> <span class='or or kw'>or</span> <span class='symbol val'>:float</span> <span class='to identifier id'>to</span> <span class='symbol val'>:time</span> <span class='conversions identifier id'>conversions</span> <span class='always identifier id'>always</span> <span class='return return kw'>return</span> <span class='the identifier id'>the</span> <span class='original identifier id'>original</span> <span class='value identifier id'>value</span> <span class='as identifier id'>as</span> <span class='a identifier id'>a</span> <span class='string identifier id'>string</span> <span class='and and kw'>and</span> <span class='set identifier id'>set</span> <span class='the identifier id'>the</span> <span class='cells identifier id'>cells</span> <span class='type identifier id'>type</span> <span class='to identifier id'>to</span> <span class='symbol val'>:string</span><span class='dot token'>.</span> + <div class='inline'> +<p>If the value provided cannot be cast into the type specified, type is +changed to :string and the following logic is applied.</p> + +<pre class="code"><span class='symbol val'>:string</span> <span class='to identifier id'>to</span> <span class='symbol val'>:integer</span> <span class='or or kw'>or</span> <span class='symbol val'>:float</span><span class='comma token'>,</span> <span class='type identifier id'>type</span> <span class='coversions identifier id'>coversions</span> <span class='always identifier id'>always</span> <span class='return return kw'>return</span> <span class='integer val'>0</span> <span class='or or kw'>or</span> <span class='integer val'>0</span><span class='integer val'>.0</span> +<span class='symbol val'>:string</span><span class='comma token'>,</span> <span class='symbol val'>:integer</span><span class='comma token'>,</span> <span class='or or kw'>or</span> <span class='symbol val'>:float</span> <span class='to identifier id'>to</span> <span class='symbol val'>:time</span> <span class='conversions identifier id'>conversions</span> <span class='always identifier id'>always</span> <span class='return return kw'>return</span> <span class='the identifier id'>the</span> <span class='original identifier id'>original</span> <span class='value identifier id'>value</span> <span class='as identifier id'>as</span> <span class='a identifier id'>a</span> <span class='string identifier id'>string</span> <span class='and and kw'>and</span> <span class='set identifier id'>set</span> <span class='the identifier id'>the</span> <span class='cells identifier id'>cells</span> <span class='type identifier id'>type</span> <span class='to identifier id'>to</span> <span class='symbol val'>:string</span><span class='dot token'>.</span> </pre> -<p> -No support is currently implemented for parsing time strings. -</p> + +<p>No support is currently implemented for parsing time strings.</p> </div> </div> -<p> -The cell’s data type. Currently only four types are supported, :time, + +<p>The cell’s data type. Currently only four types are supported, :time, :float, :integer and :string. Changing the type for a cell will recast the value into that type. If no type option is specified in the constructor, -the type is automatically determed. -</p> +the type is automatically determed.</p> </div> @@ -807,9 +781,8 @@ the type is automatically determed. — - <div class='inline'><p> -The type of data this cell’s value is cast to. -</p> + <div class='inline'> +<p>The type of data this cell’s value is cast to.</p> </div> </li> @@ -826,9 +799,8 @@ The type of data this cell’s value is cast to. — - <div class='inline'><p> -Cell.type must be one of [:time, :float, :integer, :string] -</p> + <div class='inline'> +<p>Cell.type must be one of [:time, :float, :integer, :string]</p> </div> </li> @@ -876,9 +848,8 @@ Cell.type must be one of [:time, :float, :integer, :string] </p><div class="docstring"> <div class="discussion"> - <p> -The value of this cell. -</p> + +<p>The value of this cell.</p> </div> @@ -896,9 +867,8 @@ The value of this cell. - <div class='inline'><p> -casted value based on cell’s type attribute. -</p> + <div class='inline'> +<p>casted value based on cell’s type attribute.</p> </div> </li> @@ -946,18 +916,16 @@ casted value based on cell’s type attribute. <div class="note notetag"> <strong>Note:</strong> - <div class='inline'><p> -About Time - Time in OOXML is <b>different</b> from what you might expect. -The history as to why is interesting, but you can safely assume that if you -are generating docs on a mac, you will want to specify Workbook.1904 as -true when using time typed values. -</p> + <div class='inline'> +<p>About Time - Time in OOXML is <strong>different</strong> from what you +might expect. The history as to why is interesting, but you can safely +assume that if you are generating docs on a mac, you will want to specify +Workbook.1904 as true when using time typed values.</p> </div> </div> -<p> -Cast the value into this cells data type. -</p> + +<p>Cast the value into this cells data type.</p> </div> @@ -991,16 +959,24 @@ Cast the value into this cells data type. 179 180 181 -182</pre> +182 +183 +184 +185 +186</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/cell.rb', line 169</span> <span class='def def kw'>def</span> <span class='cast_value identifier id'>cast_value</span><span class='lparen token'>(</span><span class='v identifier id'>v</span><span class='rparen token'>)</span> <span class='if if kw'>if</span> <span class='lparen token'>(</span><span class='@type ivar id'>@type</span> <span class='eq op'>==</span> <span class='symbol val'>:time</span> <span class='andop op'>&&</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='Time constant id'>Time</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='lparen token'>(</span><span class='@type ivar id'>@type</span> <span class='eq op'>==</span> <span class='symbol val'>:time</span> <span class='andop op'>&&</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='symbol val'>:to_time</span><span class='rparen token'>)</span><span class='rparen token'>)</span> - <span class='v identifier id'>v</span> <span class='assign token'>=</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='to_time identifier id'>to_time</span> - <span class='epoc identifier id'>epoc</span> <span class='assign token'>=</span> <span class='Workbook constant id'>Workbook</span><span class='dot token'>.</span><span class='date1904 identifier id'>date1904</span> <span class='integer val'>? </span><span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='local identifier id'>local</span><span class='lparen token'>(</span><span class='integer val'>1904</span><span class='comma token'>,</span><span class='integer val'>1</span><span class='comma token'>,</span><span class='integer val'>1</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='v identifier id'>v</span><span class='dot token'>.</span><span class='zone identifier id'>zone</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='local identifier id'>local</span><span class='lparen token'>(</span><span class='integer val'>1900</span><span class='comma token'>,</span><span class='integer val'>1</span><span class='comma token'>,</span><span class='integer val'>1</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='v identifier id'>v</span><span class='dot token'>.</span><span class='zone identifier id'>zone</span><span class='rparen token'>)</span> - <span class='lparen token'>(</span><span class='lparen token'>(</span><span class='v identifier id'>v</span> <span class='minus op'>-</span> <span class='epoc identifier id'>epoc</span><span class='rparen token'>)</span> <span class='div op'>/</span><span class='float val'>60.0</span><span class='div op'>/</span><span class='float val'>60.0</span><span class='div op'>/</span><span class='float val'>24.0</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> + <span class='v identifier id'>v</span> <span class='assign token'>=</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='symbol val'>:to_time</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='to_time identifier id'>to_time</span> <span class='colon op'>:</span> <span class='v identifier id'>v</span> + <span class='comment val'># Using hardcoded offsets here as some operating systems will not except a 'negative' offset from the ruby epoc.</span> + <span class='comment val'># (1970)</span> + <span class='epoc1900 identifier id'>epoc1900</span> <span class='assign token'>=</span> <span class='integer val'>-2209021200</span> <span class='comment val'>#Time.local(1900, 1, 1) </span> + <span class='epoc1904 identifier id'>epoc1904</span> <span class='assign token'>=</span> <span class='integer val'>-2082877200</span> <span class='comment val'>#Time.local(1904, 1, 1) </span> + <span class='epoc identifier id'>epoc</span> <span class='assign token'>=</span> <span class='Workbook constant id'>Workbook</span><span class='dot token'>.</span><span class='date1904 identifier id'>date1904</span> <span class='integer val'>? </span><span class='epoc1904 identifier id'>epoc1904</span> <span class='colon op'>:</span> <span class='epoc1900 identifier id'>epoc1900</span> + <span class='lparen token'>(</span><span class='lparen token'>(</span><span class='v identifier id'>v</span><span class='dot token'>.</span><span class='localtime identifier id'>localtime</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='minus op'>-</span> <span class='epoc identifier id'>epoc</span><span class='rparen token'>)</span> <span class='div op'>/</span><span class='float val'>60.0</span><span class='div op'>/</span><span class='float val'>60.0</span><span class='div op'>/</span><span class='float val'>24.0</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='elsif elsif kw'>elsif</span> <span class='@type ivar id'>@type</span> <span class='eq op'>==</span> <span class='symbol val'>:float</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='elsif elsif kw'>elsif</span> <span class='@type ivar id'>@type</span> <span class='eq op'>==</span> <span class='symbol val'>:integer</span> @@ -1028,28 +1004,22 @@ Cast the value into this cells data type. <div class="note notetag"> <strong>Note:</strong> - <div class='inline'><p> -This is only used when a cell is created but no :type option is specified, -the following rules apply: -</p> -<ol> -<li>If the value is an instance of Time, the type is set to :time - -</li> -<li>:float and :integer types are determined by regular expression matching. - -</li> -<li>Anything that does not meet either of the above is determined to be -:string. - -</li> -</ol> + <div class='inline'> +<p>This is only used when a cell is created but no :type option is specified, +the following rules apply:</p> +<ol><li> +<p>If the value is an instance of Time, the type is set to :time</p> +</li><li> +<p>:float and :integer types are determined by regular expression matching.</p> +</li><li> +<p>Anything that does not meet either of the above is determined to be +:string.</p> +</li></ol> </div> </div> -<p> -Determines the cell type based on the cell value. -</p> + +<p>Determines the cell type based on the cell value.</p> </div> @@ -1067,9 +1037,8 @@ Determines the cell type based on the cell value. — - <div class='inline'><p> -The determined type -</p> + <div class='inline'> +<p>The determined type</p> </div> </li> @@ -1126,16 +1095,14 @@ The determined type <div class="note notetag"> <strong>Note:</strong> - <div class='inline'><p> -This follows the standard spreadsheet convention of naming columns A to Z, -followed by AA to AZ etc. -</p> + <div class='inline'> +<p>This follows the standard spreadsheet convention of naming columns A to Z, +followed by AA to AZ etc.</p> </div> </div> -<p> -converts the column index into alphabetical values. -</p> + +<p>converts the column index into alphabetical values.</p> </div> @@ -1209,7 +1176,11 @@ converts the column index into alphabetical values. 180 181 182 -183</pre> +183 +184 +185 +186 +187</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/cell.rb', line 136</span> @@ -1249,9 +1220,13 @@ converts the column index into alphabetical values. <span class='comment val'># @see Axlsx#date1904</span> <span class='def def kw'>def</span> <span class='cast_value identifier id'>cast_value</span><span class='lparen token'>(</span><span class='v identifier id'>v</span><span class='rparen token'>)</span> <span class='if if kw'>if</span> <span class='lparen token'>(</span><span class='@type ivar id'>@type</span> <span class='eq op'>==</span> <span class='symbol val'>:time</span> <span class='andop op'>&&</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='Time constant id'>Time</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='lparen token'>(</span><span class='@type ivar id'>@type</span> <span class='eq op'>==</span> <span class='symbol val'>:time</span> <span class='andop op'>&&</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='symbol val'>:to_time</span><span class='rparen token'>)</span><span class='rparen token'>)</span> - <span class='v identifier id'>v</span> <span class='assign token'>=</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='to_time identifier id'>to_time</span> - <span class='epoc identifier id'>epoc</span> <span class='assign token'>=</span> <span class='Workbook constant id'>Workbook</span><span class='dot token'>.</span><span class='date1904 identifier id'>date1904</span> <span class='integer val'>? </span><span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='local identifier id'>local</span><span class='lparen token'>(</span><span class='integer val'>1904</span><span class='comma token'>,</span><span class='integer val'>1</span><span class='comma token'>,</span><span class='integer val'>1</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='v identifier id'>v</span><span class='dot token'>.</span><span class='zone identifier id'>zone</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='local identifier id'>local</span><span class='lparen token'>(</span><span class='integer val'>1900</span><span class='comma token'>,</span><span class='integer val'>1</span><span class='comma token'>,</span><span class='integer val'>1</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='v identifier id'>v</span><span class='dot token'>.</span><span class='zone identifier id'>zone</span><span class='rparen token'>)</span> - <span class='lparen token'>(</span><span class='lparen token'>(</span><span class='v identifier id'>v</span> <span class='minus op'>-</span> <span class='epoc identifier id'>epoc</span><span class='rparen token'>)</span> <span class='div op'>/</span><span class='float val'>60.0</span><span class='div op'>/</span><span class='float val'>60.0</span><span class='div op'>/</span><span class='float val'>24.0</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> + <span class='v identifier id'>v</span> <span class='assign token'>=</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='symbol val'>:to_time</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='to_time identifier id'>to_time</span> <span class='colon op'>:</span> <span class='v identifier id'>v</span> + <span class='comment val'># Using hardcoded offsets here as some operating systems will not except a 'negative' offset from the ruby epoc.</span> + <span class='comment val'># (1970)</span> + <span class='epoc1900 identifier id'>epoc1900</span> <span class='assign token'>=</span> <span class='integer val'>-2209021200</span> <span class='comment val'>#Time.local(1900, 1, 1) </span> + <span class='epoc1904 identifier id'>epoc1904</span> <span class='assign token'>=</span> <span class='integer val'>-2082877200</span> <span class='comment val'>#Time.local(1904, 1, 1) </span> + <span class='epoc identifier id'>epoc</span> <span class='assign token'>=</span> <span class='Workbook constant id'>Workbook</span><span class='dot token'>.</span><span class='date1904 identifier id'>date1904</span> <span class='integer val'>? </span><span class='epoc1904 identifier id'>epoc1904</span> <span class='colon op'>:</span> <span class='epoc1900 identifier id'>epoc1900</span> + <span class='lparen token'>(</span><span class='lparen token'>(</span><span class='v identifier id'>v</span><span class='dot token'>.</span><span class='localtime identifier id'>localtime</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='minus op'>-</span> <span class='epoc identifier id'>epoc</span><span class='rparen token'>)</span> <span class='div op'>/</span><span class='float val'>60.0</span><span class='div op'>/</span><span class='float val'>60.0</span><span class='div op'>/</span><span class='float val'>24.0</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='elsif elsif kw'>elsif</span> <span class='@type ivar id'>@type</span> <span class='eq op'>==</span> <span class='symbol val'>:float</span> <span class='v identifier id'>v</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='elsif elsif kw'>elsif</span> <span class='@type ivar id'>@type</span> <span class='eq op'>==</span> <span class='symbol val'>:integer</span> @@ -1277,9 +1252,8 @@ converts the column index into alphabetical values. </p><div class="docstring"> <div class="discussion"> - <p> -The index of the cell in the containing row. -</p> + +<p>The index of the cell in the containing row.</p> </div> @@ -1297,9 +1271,8 @@ The index of the cell in the containing row. — - <div class='inline'><p> -The index of the cell in the containing row. -</p> + <div class='inline'> +<p>The index of the cell in the containing row.</p> </div> </li> @@ -1337,9 +1310,8 @@ The index of the cell in the containing row. </p><div class="docstring"> <div class="discussion"> - <p> -The alpha(column)numeric(row) reference for this sell. -</p> + +<p>The alpha(column)numeric(row) reference for this sell.</p> </div> @@ -1349,9 +1321,8 @@ The alpha(column)numeric(row) reference for this sell. <div class="examples"> <h3>Examples:</h3> - <h4><div class='inline'><p> -Relative Cell Reference -</p> + <h4><div class='inline'> +<p>Relative Cell Reference</p> </div></h4> <pre class="example code"><span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='dot token'>.</span><span class='cells identifier id'>cells</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='dot token'>.</span><span class='r identifier id'>r</span> <span class='comment val'>#=> "A1" </span> </pre> @@ -1369,9 +1340,8 @@ Relative Cell Reference — - <div class='inline'><p> -The alpha(column)numeric(row) reference for this sell. -</p> + <div class='inline'> +<p>The alpha(column)numeric(row) reference for this sell.</p> </div> </li> @@ -1409,9 +1379,8 @@ The alpha(column)numeric(row) reference for this sell. </p><div class="docstring"> <div class="discussion"> - <p> -The absolute alpha(column)numeric(row) reference for this sell. -</p> + +<p>The absolute alpha(column)numeric(row) reference for this sell.</p> </div> @@ -1421,9 +1390,8 @@ The absolute alpha(column)numeric(row) reference for this sell. <div class="examples"> <h3>Examples:</h3> - <h4><div class='inline'><p> -Absolute Cell Reference -</p> + <h4><div class='inline'> +<p>Absolute Cell Reference</p> </div></h4> <pre class="example code"><span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='dot token'>.</span><span class='cells identifier id'>cells</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='dot token'>.</span><span class='r identifier id'>r</span> <span class='comment val'>#=> "$A$1" </span> </pre> @@ -1441,9 +1409,8 @@ Absolute Cell Reference — - <div class='inline'><p> -The absolute alpha(column)numeric(row) reference for this sell. -</p> + <div class='inline'> +<p>The absolute alpha(column)numeric(row) reference for this sell.</p> </div> </li> @@ -1484,16 +1451,14 @@ The absolute alpha(column)numeric(row) reference for this sell. <div class="note notetag"> <strong>Note:</strong> - <div class='inline'><p> -Shared Strings are not used in this library. All values are set directly in -the each sheet. -</p> + <div class='inline'> +<p>Shared Strings are not used in this library. All values are set directly in +the each sheet.</p> </div> </div> -<p> -Serializes the cell -</p> + +<p>Serializes the cell</p> </div> @@ -1512,9 +1477,8 @@ Serializes the cell — - <div class='inline'><p> -The document builder instance this objects xml will be added to. -</p> + <div class='inline'> +<p>The document builder instance this objects xml will be added to.</p> </div> </li> @@ -1532,9 +1496,8 @@ The document builder instance this objects xml will be added to. — - <div class='inline'><p> -xml text for the cell -</p> + <div class='inline'> +<p>xml text for the cell</p> </div> </li> @@ -1586,7 +1549,7 @@ xml text for the cell </div> <div id="footer"> - Generated on Tue Nov 29 13:28:42 2011 by + Generated on Wed Nov 30 08:46:35 2011 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.7.3 (ruby-1.8.7). </div> |
