axlsx 1.0.9 → 1.0.10a
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -0
- data/Gemfile.lock +24 -0
- data/README.md +86 -1
- data/axlsx.gemspec +6 -10
- data/doc/Axlsx.html +557 -360
- data/doc/Axlsx/App.html +347 -244
- data/doc/Axlsx/Ar.html +200 -0
- data/doc/Axlsx/Ar/ClassMethods.html +192 -0
- data/doc/Axlsx/Ar/InstanceMethods.html +109 -0
- data/doc/Axlsx/Ar/SingletonMethods.html +304 -0
- data/doc/Axlsx/Axis.html +131 -98
- data/doc/Axlsx/Bar3DChart.html +138 -106
- data/doc/Axlsx/BarSeries.html +73 -54
- data/doc/Axlsx/Border.html +114 -87
- data/doc/Axlsx/BorderPr.html +107 -82
- data/doc/Axlsx/CatAxis.html +93 -68
- data/doc/Axlsx/CatAxisData.html +47 -38
- data/doc/Axlsx/Cell.html +642 -148
- data/doc/Axlsx/CellAlignment.html +152 -111
- data/doc/Axlsx/CellProtection.html +63 -45
- data/doc/Axlsx/CellStyle.html +101 -73
- data/doc/Axlsx/Chart.html +238 -179
- data/doc/Axlsx/Color.html +75 -53
- data/doc/Axlsx/ContentType.html +34 -26
- data/doc/Axlsx/Core.html +54 -42
- data/doc/Axlsx/DataTypeValidator.html +39 -30
- data/doc/Axlsx/Default.html +59 -43
- data/doc/Axlsx/Drawing.html +176 -128
- data/doc/Axlsx/Fill.html +46 -33
- data/doc/Axlsx/Font.html +197 -147
- data/doc/Axlsx/GradientFill.html +114 -82
- data/doc/Axlsx/GradientStop.html +47 -33
- data/doc/Axlsx/GraphicFrame.html +78 -60
- data/doc/Axlsx/Line3DChart.html +125 -97
- data/doc/Axlsx/LineSeries.html +60 -44
- data/doc/Axlsx/Marker.html +98 -71
- data/doc/Axlsx/NumFmt.html +99 -80
- data/doc/Axlsx/OneCellAnchor.html +126 -94
- data/doc/Axlsx/Override.html +59 -43
- data/doc/Axlsx/Package.html +269 -134
- data/doc/Axlsx/PatternFill.html +93 -72
- data/doc/Axlsx/Pic.html +202 -152
- data/doc/Axlsx/Pie3DChart.html +39 -30
- data/doc/Axlsx/PieSeries.html +72 -53
- data/doc/Axlsx/RegexValidator.html +19 -14
- data/doc/Axlsx/Relationship.html +60 -43
- data/doc/Axlsx/Relationships.html +34 -26
- data/doc/Axlsx/RestrictionValidator.html +31 -22
- data/doc/Axlsx/Row.html +241 -67
- data/doc/Axlsx/Scaling.html +80 -59
- data/doc/Axlsx/SerAxis.html +71 -51
- data/doc/Axlsx/Series.html +179 -51
- data/doc/Axlsx/SeriesTitle.html +29 -24
- data/doc/Axlsx/Styles.html +354 -285
- data/doc/Axlsx/TableStyle.html +74 -54
- data/doc/Axlsx/TableStyleElement.html +99 -79
- data/doc/Axlsx/TableStyles.html +65 -47
- data/doc/Axlsx/Title.html +66 -51
- data/doc/Axlsx/TwoCellAnchor.html +129 -96
- data/doc/Axlsx/ValAxis.html +52 -38
- data/doc/Axlsx/ValAxisData.html +32 -27
- data/doc/Axlsx/View3D.html +111 -80
- data/doc/Axlsx/Workbook.html +333 -272
- data/doc/Axlsx/Worksheet.html +1018 -266
- data/doc/Axlsx/Xf.html +188 -134
- data/doc/_index.html +44 -8
- data/doc/class_list.html +1 -1
- data/doc/file.LICENSE.html +28 -23
- data/doc/file.README.html +180 -91
- data/doc/index.html +180 -91
- data/doc/method_list.html +541 -421
- data/doc/top-level-namespace.html +2 -2
- data/examples/example.rb +70 -13
- data/lib/axlsx.rb +1 -0
- data/lib/axlsx/ar.rb +72 -0
- data/lib/axlsx/package.rb +8 -1
- data/lib/axlsx/util/simple_typed_list.rb +5 -0
- data/lib/axlsx/version.rb +1 -1
- data/lib/axlsx/workbook/workbook.rb +4 -2
- data/lib/axlsx/workbook/worksheet/row.rb +15 -0
- data/lib/axlsx/workbook/worksheet/worksheet.rb +44 -1
- data/test/workbook/worksheet/tc_row.rb +6 -0
- data/test/workbook/worksheet/tc_worksheet.rb +36 -0
- metadata +103 -59
data/doc/Axlsx/BarSeries.html
CHANGED
@@ -99,13 +99,15 @@
|
|
99
99
|
|
100
100
|
<div class="note notetag">
|
101
101
|
<strong>Note:</strong>
|
102
|
-
<div class='inline'>
|
103
|
-
|
102
|
+
<div class='inline'><p>
|
103
|
+
The recommended way to manage series is to use Chart#add_series
|
104
|
+
</p>
|
104
105
|
</div>
|
105
106
|
</div>
|
106
107
|
|
107
|
-
|
108
|
-
|
108
|
+
<p>
|
109
|
+
A BarSeries defines the title, data and labels for bar charts
|
110
|
+
</p>
|
109
111
|
|
110
112
|
|
111
113
|
</div>
|
@@ -150,8 +152,9 @@
|
|
150
152
|
|
151
153
|
|
152
154
|
|
153
|
-
<span class="summary_desc"><div class='inline'>
|
154
|
-
|
155
|
+
<span class="summary_desc"><div class='inline'><p>
|
156
|
+
The data for this series.
|
157
|
+
</p>
|
155
158
|
</div></span>
|
156
159
|
|
157
160
|
</li>
|
@@ -176,8 +179,9 @@
|
|
176
179
|
|
177
180
|
|
178
181
|
|
179
|
-
<span class="summary_desc"><div class='inline'>
|
180
|
-
|
182
|
+
<span class="summary_desc"><div class='inline'><p>
|
183
|
+
The labels for this series.
|
184
|
+
</p>
|
181
185
|
</div></span>
|
182
186
|
|
183
187
|
</li>
|
@@ -202,9 +206,10 @@
|
|
202
206
|
|
203
207
|
|
204
208
|
|
205
|
-
<span class="summary_desc"><div class='inline'>
|
206
|
-
|
207
|
-
:clustered, :standard, :stacked]
|
209
|
+
<span class="summary_desc"><div class='inline'><p>
|
210
|
+
The shabe of the bars or columns must be one of [:percentStacked,
|
211
|
+
:clustered, :standard, :stacked].
|
212
|
+
</p>
|
208
213
|
</div></span>
|
209
214
|
|
210
215
|
</li>
|
@@ -249,8 +254,9 @@
|
|
249
254
|
|
250
255
|
|
251
256
|
|
252
|
-
<span class="summary_desc"><div class='inline'>
|
253
|
-
|
257
|
+
<span class="summary_desc"><div class='inline'><p>
|
258
|
+
Creates a new series.
|
259
|
+
</p>
|
254
260
|
</div></span>
|
255
261
|
|
256
262
|
</li>
|
@@ -272,8 +278,9 @@
|
|
272
278
|
|
273
279
|
|
274
280
|
|
275
|
-
<span class="summary_desc"><div class='inline'>
|
276
|
-
|
281
|
+
<span class="summary_desc"><div class='inline'><p>
|
282
|
+
Serializes the series.
|
283
|
+
</p>
|
277
284
|
</div></span>
|
278
285
|
|
279
286
|
</li>
|
@@ -304,8 +311,9 @@
|
|
304
311
|
|
305
312
|
</p><div class="docstring">
|
306
313
|
<div class="discussion">
|
307
|
-
|
308
|
-
|
314
|
+
<p>
|
315
|
+
Creates a new series
|
316
|
+
</p>
|
309
317
|
|
310
318
|
|
311
319
|
</div>
|
@@ -337,8 +345,9 @@
|
|
337
345
|
|
338
346
|
|
339
347
|
—
|
340
|
-
<div class='inline'>
|
341
|
-
|
348
|
+
<div class='inline'><p>
|
349
|
+
a customizable set of options
|
350
|
+
</p>
|
342
351
|
</div>
|
343
352
|
|
344
353
|
</li>
|
@@ -409,12 +418,13 @@
|
|
409
418
|
<td>
|
410
419
|
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/bar_series.rb', line 28</span>
|
411
420
|
|
412
|
-
<span class='kw'>def</span> <span class='id
|
413
|
-
<span class='ivar'>@shape</span> <span class='
|
414
|
-
<span class='kw'>super</span><span class='lparen'>(</span><span class='id
|
415
|
-
<span class='kw'>self</span><span class='
|
416
|
-
<span class='kw'>self</span><span class='
|
417
|
-
<span class='kw'>end</span
|
421
|
+
<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='chart identifier id'>chart</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
422
|
+
<span class='@shape ivar id'>@shape</span> <span class='assign token'>=</span> <span class='symbol val'>:box</span>
|
423
|
+
<span class='super super kw'>super</span><span class='lparen token'>(</span><span class='chart identifier id'>chart</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='rparen token'>)</span>
|
424
|
+
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='labels identifier id'>labels</span> <span class='assign token'>=</span> <span class='CatAxisData constant id'>CatAxisData</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:labels</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> <span class='unless unless_mod kw'>unless</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:labels</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span>
|
425
|
+
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='data identifier id'>data</span> <span class='assign token'>=</span> <span class='ValAxisData constant id'>ValAxisData</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:data</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> <span class='unless unless_mod kw'>unless</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:data</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span>
|
426
|
+
<span class='end end kw'>end</span>
|
427
|
+
</pre>
|
418
428
|
</td>
|
419
429
|
</tr>
|
420
430
|
</table>
|
@@ -437,8 +447,9 @@
|
|
437
447
|
|
438
448
|
</p><div class="docstring">
|
439
449
|
<div class="discussion">
|
440
|
-
|
441
|
-
|
450
|
+
<p>
|
451
|
+
The data for this series.
|
452
|
+
</p>
|
442
453
|
|
443
454
|
|
444
455
|
</div>
|
@@ -472,9 +483,10 @@
|
|
472
483
|
<td>
|
473
484
|
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/bar_series.rb', line 11</span>
|
474
485
|
|
475
|
-
<span class='kw'>def</span> <span class='id
|
476
|
-
<span class='ivar'>@data</span>
|
477
|
-
<span class='kw'>end</span
|
486
|
+
<span class='def def kw'>def</span> <span class='data identifier id'>data</span>
|
487
|
+
<span class='@data ivar id'>@data</span>
|
488
|
+
<span class='end end kw'>end</span>
|
489
|
+
</pre>
|
478
490
|
</td>
|
479
491
|
</tr>
|
480
492
|
</table>
|
@@ -492,8 +504,9 @@
|
|
492
504
|
|
493
505
|
</p><div class="docstring">
|
494
506
|
<div class="discussion">
|
495
|
-
|
496
|
-
|
507
|
+
<p>
|
508
|
+
The labels for this series.
|
509
|
+
</p>
|
497
510
|
|
498
511
|
|
499
512
|
</div>
|
@@ -527,9 +540,10 @@
|
|
527
540
|
<td>
|
528
541
|
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/bar_series.rb', line 15</span>
|
529
542
|
|
530
|
-
<span class='kw'>def</span> <span class='id
|
531
|
-
<span class='ivar'>@labels</span>
|
532
|
-
<span class='kw'>end</span
|
543
|
+
<span class='def def kw'>def</span> <span class='labels identifier id'>labels</span>
|
544
|
+
<span class='@labels ivar id'>@labels</span>
|
545
|
+
<span class='end end kw'>end</span>
|
546
|
+
</pre>
|
533
547
|
</td>
|
534
548
|
</tr>
|
535
549
|
</table>
|
@@ -547,9 +561,10 @@
|
|
547
561
|
|
548
562
|
</p><div class="docstring">
|
549
563
|
<div class="discussion">
|
550
|
-
|
551
|
-
|
552
|
-
:clustered, :standard, :stacked]
|
564
|
+
<p>
|
565
|
+
The shabe of the bars or columns must be one of [:percentStacked,
|
566
|
+
:clustered, :standard, :stacked]
|
567
|
+
</p>
|
553
568
|
|
554
569
|
|
555
570
|
</div>
|
@@ -583,9 +598,10 @@
|
|
583
598
|
<td>
|
584
599
|
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/bar_series.rb', line 20</span>
|
585
600
|
|
586
|
-
<span class='kw'>def</span> <span class='id
|
587
|
-
<span class='ivar'>@shape</span>
|
588
|
-
<span class='kw'>end</span
|
601
|
+
<span class='def def kw'>def</span> <span class='shape identifier id'>shape</span>
|
602
|
+
<span class='@shape ivar id'>@shape</span>
|
603
|
+
<span class='end end kw'>end</span>
|
604
|
+
</pre>
|
589
605
|
</td>
|
590
606
|
</tr>
|
591
607
|
</table>
|
@@ -607,8 +623,9 @@
|
|
607
623
|
|
608
624
|
</p><div class="docstring">
|
609
625
|
<div class="discussion">
|
610
|
-
|
611
|
-
|
626
|
+
<p>
|
627
|
+
Serializes the series
|
628
|
+
</p>
|
612
629
|
|
613
630
|
|
614
631
|
</div>
|
@@ -627,8 +644,9 @@
|
|
627
644
|
|
628
645
|
|
629
646
|
—
|
630
|
-
<div class='inline'>
|
631
|
-
|
647
|
+
<div class='inline'><p>
|
648
|
+
The document builder instance this objects xml will be added to.
|
649
|
+
</p>
|
632
650
|
</div>
|
633
651
|
|
634
652
|
</li>
|
@@ -666,13 +684,14 @@
|
|
666
684
|
<td>
|
667
685
|
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/bar_series.rb', line 45</span>
|
668
686
|
|
669
|
-
<span class='kw'>def</span> <span class='id
|
670
|
-
<span class='kw'>super</span><span class='lparen'>(</span><span class='id
|
671
|
-
<span class='ivar'>@labels</span><span class='
|
672
|
-
<span class='ivar'>@data</span><span class='
|
673
|
-
<span class='id
|
674
|
-
<span class='kw'>end</span>
|
675
|
-
<span class='kw'>end</span
|
687
|
+
<span class='def def kw'>def</span> <span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml identifier id'>xml</span><span class='rparen token'>)</span>
|
688
|
+
<span class='super super kw'>super</span><span class='lparen token'>(</span><span class='xml identifier id'>xml</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='xml_inner identifier id'>xml_inner</span><span class='bitor op'>|</span>
|
689
|
+
<span class='@labels ivar id'>@labels</span><span class='dot token'>.</span><span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml_inner identifier id'>xml_inner</span><span class='rparen token'>)</span> <span class='unless unless_mod kw'>unless</span> <span class='@labels ivar id'>@labels</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span>
|
690
|
+
<span class='@data ivar id'>@data</span><span class='dot token'>.</span><span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml_inner identifier id'>xml_inner</span><span class='rparen token'>)</span> <span class='unless unless_mod kw'>unless</span> <span class='@data ivar id'>@data</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span>
|
691
|
+
<span class='xml_inner identifier id'>xml_inner</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>'c:shape'</span><span class='comma token'>,</span> <span class='symbol val'>:val=</span><span class='gt op'>></span><span class='@shape ivar id'>@shape</span><span class='rparen token'>)</span>
|
692
|
+
<span class='end end kw'>end</span>
|
693
|
+
<span class='end end kw'>end</span>
|
694
|
+
</pre>
|
676
695
|
</td>
|
677
696
|
</tr>
|
678
697
|
</table>
|
@@ -683,9 +702,9 @@
|
|
683
702
|
</div>
|
684
703
|
|
685
704
|
<div id="footer">
|
686
|
-
Generated on
|
705
|
+
Generated on Sun Nov 27 21:54:24 2011 by
|
687
706
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
688
|
-
0.7.3 (ruby-1.
|
707
|
+
0.7.3 (ruby-1.8.7).
|
689
708
|
</div>
|
690
709
|
|
691
710
|
</body>
|
data/doc/Axlsx/Border.html
CHANGED
@@ -94,8 +94,9 @@
|
|
94
94
|
|
95
95
|
<h2>Overview</h2><div class="docstring">
|
96
96
|
<div class="discussion">
|
97
|
-
|
98
|
-
|
97
|
+
<p>
|
98
|
+
This class details a border used in Office Open XML spreadsheet styles.
|
99
|
+
</p>
|
99
100
|
|
100
101
|
|
101
102
|
</div>
|
@@ -127,10 +128,11 @@
|
|
127
128
|
|
128
129
|
|
129
130
|
|
130
|
-
<span class="summary_desc"><div class='inline'>
|
131
|
-
|
131
|
+
<span class="summary_desc"><div class='inline'><p>
|
132
|
+
The diagonal down property for the border that indicates if the border
|
132
133
|
should include a diagonal line from the top left to the top right of the
|
133
|
-
cell
|
134
|
+
cell.
|
135
|
+
</p>
|
134
136
|
</div></span>
|
135
137
|
|
136
138
|
</li>
|
@@ -155,9 +157,10 @@ cell.</p>
|
|
155
157
|
|
156
158
|
|
157
159
|
|
158
|
-
<span class="summary_desc"><div class='inline'>
|
159
|
-
|
160
|
-
include a diagonal line from the bottom left to the top right of the cell
|
160
|
+
<span class="summary_desc"><div class='inline'><p>
|
161
|
+
The diagonal up property for the border that indicates if the border should
|
162
|
+
include a diagonal line from the bottom left to the top right of the cell.
|
163
|
+
</p>
|
161
164
|
</div></span>
|
162
165
|
|
163
166
|
</li>
|
@@ -182,10 +185,11 @@ include a diagonal line from the bottom left to the top right of the cell.</p>
|
|
182
185
|
|
183
186
|
|
184
187
|
|
185
|
-
<span class="summary_desc"><div class='inline'>
|
186
|
-
|
188
|
+
<span class="summary_desc"><div class='inline'><p>
|
189
|
+
The outline property for the border indicating that top, left, right and
|
187
190
|
bottom borders should only be applied to the outside border of a range of
|
188
|
-
cells
|
191
|
+
cells.
|
192
|
+
</p>
|
189
193
|
</div></span>
|
190
194
|
|
191
195
|
</li>
|
@@ -210,8 +214,9 @@ cells.</p>
|
|
210
214
|
|
211
215
|
|
212
216
|
|
213
|
-
<span class="summary_desc"><div class='inline'>
|
214
|
-
|
217
|
+
<span class="summary_desc"><div class='inline'><p>
|
218
|
+
A list of BorderPr objects for this border.
|
219
|
+
</p>
|
215
220
|
</div></span>
|
216
221
|
|
217
222
|
</li>
|
@@ -248,8 +253,9 @@ cells.</p>
|
|
248
253
|
|
249
254
|
|
250
255
|
|
251
|
-
<span class="summary_desc"><div class='inline'>
|
252
|
-
|
256
|
+
<span class="summary_desc"><div class='inline'><p>
|
257
|
+
Creates a new Border object.
|
258
|
+
</p>
|
253
259
|
</div></span>
|
254
260
|
|
255
261
|
</li>
|
@@ -271,8 +277,9 @@ cells.</p>
|
|
271
277
|
|
272
278
|
|
273
279
|
|
274
|
-
<span class="summary_desc"><div class='inline'>
|
275
|
-
|
280
|
+
<span class="summary_desc"><div class='inline'><p>
|
281
|
+
Serializes the border element.
|
282
|
+
</p>
|
276
283
|
</div></span>
|
277
284
|
|
278
285
|
</li>
|
@@ -293,8 +300,9 @@ cells.</p>
|
|
293
300
|
|
294
301
|
</p><div class="docstring">
|
295
302
|
<div class="discussion">
|
296
|
-
|
297
|
-
|
303
|
+
<p>
|
304
|
+
Creates a new Border object
|
305
|
+
</p>
|
298
306
|
|
299
307
|
|
300
308
|
</div>
|
@@ -304,18 +312,20 @@ cells.</p>
|
|
304
312
|
<div class="examples">
|
305
313
|
<h3>Examples:</h3>
|
306
314
|
|
307
|
-
<h4><div class='inline'>
|
308
|
-
|
315
|
+
<h4><div class='inline'><p>
|
316
|
+
Making a border
|
317
|
+
</p>
|
309
318
|
</div></h4>
|
310
|
-
<pre class="example code">p = Package
|
311
|
-
red_border = Border
|
312
|
-
[
|
313
|
-
red_border
|
314
|
-
end
|
315
|
-
|
316
|
-
red_border = p
|
317
|
-
|
318
|
-
p
|
319
|
+
<pre class="example code"><span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
|
320
|
+
<span class='red_border identifier id'>red_border</span> <span class='assign token'>=</span> <span class='Border constant id'>Border</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
|
321
|
+
<span class='lbrack token'>[</span><span class='symbol val'>:left</span><span class='comma token'>,</span> <span class='symbol val'>:right</span><span class='comma token'>,</span> <span class='symbol val'>:top</span><span class='comma token'>,</span> <span class='symbol val'>:bottom</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='item identifier id'>item</span><span class='bitor op'>|</span>
|
322
|
+
<span class='red_border identifier id'>red_border</span><span class='dot token'>.</span><span class='prs identifier id'>prs</span> <span class='lshft op'><<</span> <span class='BorderPr constant id'>BorderPr</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:name=</span><span class='gt op'>></span><span class='item identifier id'>item</span><span class='comma token'>,</span> <span class='symbol val'>:style=</span><span class='gt op'>></span><span class='symbol val'>:thin</span><span class='comma token'>,</span> <span class='symbol val'>:color=</span><span class='gt op'>></span><span class='Color constant id'>Color</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:rgb=</span><span class='gt op'>></span><span class='string val'>"FFFF0000"</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='comment val'># </span>
|
323
|
+
<span class='end end kw'>end</span>
|
324
|
+
<span class='comment val'># this sets red_border to be the index for the created border.</span>
|
325
|
+
<span class='red_border identifier id'>red_border</span> <span class='assign token'>=</span> <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='@borders ivar id'>@borders</span> <span class='lshft op'><<</span> <span class='red_border identifier id'>red_border</span>
|
326
|
+
<span class='comment val'>#used in row creation as follows. This will add a red border to each of the cells in the row.</span>
|
327
|
+
<span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span> <span class='lshft op'><<</span> <span class='symbol val'>:values=</span><span class='gt op'>></span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span><span class='integer val'>2</span><span class='comma token'>,</span><span class='integer val'>3</span><span class='rbrack token'>]</span> <span class='symbol val'>:style=</span><span class='gt op'>></span><span class='red_border identifier id'>red_border</span>
|
328
|
+
</pre>
|
319
329
|
|
320
330
|
</div>
|
321
331
|
<h3>Parameters:</h3>
|
@@ -333,8 +343,9 @@ p.workbook.add_worksheet.rows << :values=>[1,2,3] :style=>red_border
|
|
333
343
|
|
334
344
|
|
335
345
|
—
|
336
|
-
<div class='inline'>
|
337
|
-
|
346
|
+
<div class='inline'><p>
|
347
|
+
a customizable set of options
|
348
|
+
</p>
|
338
349
|
</div>
|
339
350
|
|
340
351
|
</li>
|
@@ -394,12 +405,13 @@ p.workbook.add_worksheet.rows << :values=>[1,2,3] :style=>red_border
|
|
394
405
|
<td>
|
395
406
|
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 31</span>
|
396
407
|
|
397
|
-
<span class='kw'>def</span> <span class='id
|
398
|
-
<span class='ivar'>@prs</span> <span class='
|
399
|
-
<span class='id
|
400
|
-
<span class='kw'>self</span><span class='
|
401
|
-
<span class='kw'>end</span>
|
402
|
-
<span class='kw'>end</span
|
408
|
+
<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
409
|
+
<span class='@prs ivar id'>@prs</span> <span class='assign token'>=</span> <span class='SimpleTypedList constant id'>SimpleTypedList</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='BorderPr constant id'>BorderPr</span>
|
410
|
+
<span class='options identifier id'>options</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='o identifier id'>o</span><span class='bitor op'>|</span>
|
411
|
+
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='dstring node'>"#{o[0]}="</span><span class='comma token'>,</span> <span class='o identifier id'>o</span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> <span class='if if_mod kw'>if</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='respond_to? fid id'>respond_to?</span> <span class='dstring node'>"#{o[0]}="</span>
|
412
|
+
<span class='end end kw'>end</span>
|
413
|
+
<span class='end end kw'>end</span>
|
414
|
+
</pre>
|
403
415
|
</td>
|
404
416
|
</tr>
|
405
417
|
</table>
|
@@ -422,10 +434,11 @@ p.workbook.add_worksheet.rows << :values=>[1,2,3] :style=>red_border
|
|
422
434
|
|
423
435
|
</p><div class="docstring">
|
424
436
|
<div class="discussion">
|
425
|
-
|
426
|
-
|
437
|
+
<p>
|
438
|
+
The diagonal down property for the border that indicates if the border
|
427
439
|
should include a diagonal line from the top left to the top right of the
|
428
|
-
cell
|
440
|
+
cell.
|
441
|
+
</p>
|
429
442
|
|
430
443
|
|
431
444
|
</div>
|
@@ -443,10 +456,11 @@ cell.</p>
|
|
443
456
|
|
444
457
|
|
445
458
|
—
|
446
|
-
<div class='inline'>
|
447
|
-
|
459
|
+
<div class='inline'><p>
|
460
|
+
The diagonal down property for the border that indicates if the border
|
448
461
|
should include a diagonal line from the top left to the top right of the
|
449
|
-
cell
|
462
|
+
cell.
|
463
|
+
</p>
|
450
464
|
</div>
|
451
465
|
|
452
466
|
</li>
|
@@ -466,9 +480,10 @@ cell.</p>
|
|
466
480
|
<td>
|
467
481
|
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 9</span>
|
468
482
|
|
469
|
-
<span class='kw'>def</span> <span class='id
|
470
|
-
<span class='ivar'>@diagonalDown</span>
|
471
|
-
<span class='kw'>end</span
|
483
|
+
<span class='def def kw'>def</span> <span class='diagonalDown identifier id'>diagonalDown</span>
|
484
|
+
<span class='@diagonalDown ivar id'>@diagonalDown</span>
|
485
|
+
<span class='end end kw'>end</span>
|
486
|
+
</pre>
|
472
487
|
</td>
|
473
488
|
</tr>
|
474
489
|
</table>
|
@@ -486,9 +501,10 @@ cell.</p>
|
|
486
501
|
|
487
502
|
</p><div class="docstring">
|
488
503
|
<div class="discussion">
|
489
|
-
|
490
|
-
|
491
|
-
include a diagonal line from the bottom left to the top right of the cell
|
504
|
+
<p>
|
505
|
+
The diagonal up property for the border that indicates if the border should
|
506
|
+
include a diagonal line from the bottom left to the top right of the cell.
|
507
|
+
</p>
|
492
508
|
|
493
509
|
|
494
510
|
</div>
|
@@ -506,9 +522,10 @@ include a diagonal line from the bottom left to the top right of the cell.</p>
|
|
506
522
|
|
507
523
|
|
508
524
|
—
|
509
|
-
<div class='inline'>
|
510
|
-
|
511
|
-
include a diagonal line from the bottom left to the top right of the cell
|
525
|
+
<div class='inline'><p>
|
526
|
+
The diagonal up property for the border that indicates if the border should
|
527
|
+
include a diagonal line from the bottom left to the top right of the cell.
|
528
|
+
</p>
|
512
529
|
</div>
|
513
530
|
|
514
531
|
</li>
|
@@ -528,9 +545,10 @@ include a diagonal line from the bottom left to the top right of the cell.</p>
|
|
528
545
|
<td>
|
529
546
|
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 6</span>
|
530
547
|
|
531
|
-
<span class='kw'>def</span> <span class='id
|
532
|
-
<span class='ivar'>@diagonalUp</span>
|
533
|
-
<span class='kw'>end</span
|
548
|
+
<span class='def def kw'>def</span> <span class='diagonalUp identifier id'>diagonalUp</span>
|
549
|
+
<span class='@diagonalUp ivar id'>@diagonalUp</span>
|
550
|
+
<span class='end end kw'>end</span>
|
551
|
+
</pre>
|
534
552
|
</td>
|
535
553
|
</tr>
|
536
554
|
</table>
|
@@ -548,10 +566,11 @@ include a diagonal line from the bottom left to the top right of the cell.</p>
|
|
548
566
|
|
549
567
|
</p><div class="docstring">
|
550
568
|
<div class="discussion">
|
551
|
-
|
552
|
-
|
569
|
+
<p>
|
570
|
+
The outline property for the border indicating that top, left, right and
|
553
571
|
bottom borders should only be applied to the outside border of a range of
|
554
|
-
cells
|
572
|
+
cells.
|
573
|
+
</p>
|
555
574
|
|
556
575
|
|
557
576
|
</div>
|
@@ -569,10 +588,11 @@ cells.</p>
|
|
569
588
|
|
570
589
|
|
571
590
|
—
|
572
|
-
<div class='inline'>
|
573
|
-
|
591
|
+
<div class='inline'><p>
|
592
|
+
The outline property for the border indicating that top, left, right and
|
574
593
|
bottom borders should only be applied to the outside border of a range of
|
575
|
-
cells
|
594
|
+
cells.
|
595
|
+
</p>
|
576
596
|
</div>
|
577
597
|
|
578
598
|
</li>
|
@@ -592,9 +612,10 @@ cells.</p>
|
|
592
612
|
<td>
|
593
613
|
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 12</span>
|
594
614
|
|
595
|
-
<span class='kw'>def</span> <span class='id
|
596
|
-
<span class='ivar'>@outline</span>
|
597
|
-
<span class='kw'>end</span
|
615
|
+
<span class='def def kw'>def</span> <span class='outline identifier id'>outline</span>
|
616
|
+
<span class='@outline ivar id'>@outline</span>
|
617
|
+
<span class='end end kw'>end</span>
|
618
|
+
</pre>
|
598
619
|
</td>
|
599
620
|
</tr>
|
600
621
|
</table>
|
@@ -612,8 +633,9 @@ cells.</p>
|
|
612
633
|
|
613
634
|
</p><div class="docstring">
|
614
635
|
<div class="discussion">
|
615
|
-
|
616
|
-
|
636
|
+
<p>
|
637
|
+
A list of BorderPr objects for this border.
|
638
|
+
</p>
|
617
639
|
|
618
640
|
|
619
641
|
</div>
|
@@ -631,8 +653,9 @@ cells.</p>
|
|
631
653
|
|
632
654
|
|
633
655
|
—
|
634
|
-
<div class='inline'>
|
635
|
-
|
656
|
+
<div class='inline'><p>
|
657
|
+
A list of BorderPr objects for this border.
|
658
|
+
</p>
|
636
659
|
</div>
|
637
660
|
|
638
661
|
</li>
|
@@ -652,9 +675,10 @@ cells.</p>
|
|
652
675
|
<td>
|
653
676
|
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 15</span>
|
654
677
|
|
655
|
-
<span class='kw'>def</span> <span class='id
|
656
|
-
<span class='ivar'>@prs</span>
|
657
|
-
<span class='kw'>end</span
|
678
|
+
<span class='def def kw'>def</span> <span class='prs identifier id'>prs</span>
|
679
|
+
<span class='@prs ivar id'>@prs</span>
|
680
|
+
<span class='end end kw'>end</span>
|
681
|
+
</pre>
|
658
682
|
</td>
|
659
683
|
</tr>
|
660
684
|
</table>
|
@@ -676,8 +700,9 @@ cells.</p>
|
|
676
700
|
|
677
701
|
</p><div class="docstring">
|
678
702
|
<div class="discussion">
|
679
|
-
|
680
|
-
|
703
|
+
<p>
|
704
|
+
Serializes the border element
|
705
|
+
</p>
|
681
706
|
|
682
707
|
|
683
708
|
</div>
|
@@ -696,8 +721,9 @@ cells.</p>
|
|
696
721
|
|
697
722
|
|
698
723
|
—
|
699
|
-
<div class='inline'>
|
700
|
-
|
724
|
+
<div class='inline'><p>
|
725
|
+
The document builder instance this objects xml will be added to.
|
726
|
+
</p>
|
701
727
|
</div>
|
702
728
|
|
703
729
|
</li>
|
@@ -724,15 +750,16 @@ cells.</p>
|
|
724
750
|
<td>
|
725
751
|
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 47</span>
|
726
752
|
|
727
|
-
<span class='kw'>def</span> <span class='id
|
728
|
-
<span class='id
|
729
|
-
<span class='
|
730
|
-
<span class='ivar'>@prs</span><span class='
|
731
|
-
<span class='id
|
732
|
-
<span class='kw'>end</span>
|
733
|
-
<span class='kw'>end</span>
|
734
|
-
<span class='rbrace'>}</span>
|
735
|
-
<span class='kw'>end</span
|
753
|
+
<span class='def def kw'>def</span> <span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml identifier id'>xml</span><span class='rparen token'>)</span>
|
754
|
+
<span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='border identifier id'>border</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='instance_values identifier id'>instance_values</span><span class='dot token'>.</span><span class='select identifier id'>select</span><span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='k identifier id'>k</span><span class='comma token'>,</span><span class='v identifier id'>v</span><span class='bitor op'>|</span> <span class='lbrack token'>[</span><span class='symbol val'>:diagonalUp</span><span class='comma token'>,</span> <span class='symbol val'>:diagonalDown</span><span class='comma token'>,</span> <span class='symbol val'>:outline</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='include? fid id'>include?</span> <span class='k identifier id'>k</span> <span class='rbrace token'>}</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span>
|
755
|
+
<span class='lbrack token'>[</span><span class='symbol val'>:start</span><span class='comma token'>,</span> <span class='symbol val'>:end</span><span class='comma token'>,</span> <span class='symbol val'>:left</span><span class='comma token'>,</span> <span class='symbol val'>:right</span><span class='comma token'>,</span> <span class='symbol val'>:top</span><span class='comma token'>,</span> <span class='symbol val'>:bottom</span><span class='comma token'>,</span> <span class='symbol val'>:diagonal</span><span class='comma token'>,</span> <span class='symbol val'>:vertical</span><span class='comma token'>,</span> <span class='symbol val'>:horizontal</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='k identifier id'>k</span><span class='bitor op'>|</span>
|
756
|
+
<span class='@prs ivar id'>@prs</span><span class='dot token'>.</span><span class='select identifier id'>select</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='pr identifier id'>pr</span><span class='bitor op'>|</span> <span class='pr identifier id'>pr</span><span class='dot token'>.</span><span class='name identifier id'>name</span> <span class='eq op'>==</span> <span class='k identifier id'>k</span> <span class='rbrace token'>}</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='part identifier id'>part</span><span class='bitor op'>|</span>
|
757
|
+
<span class='part identifier id'>part</span><span class='dot token'>.</span><span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml identifier id'>xml</span><span class='rparen token'>)</span>
|
758
|
+
<span class='end end kw'>end</span>
|
759
|
+
<span class='end end kw'>end</span>
|
760
|
+
<span class='rbrace token'>}</span>
|
761
|
+
<span class='end end kw'>end</span>
|
762
|
+
</pre>
|
736
763
|
</td>
|
737
764
|
</tr>
|
738
765
|
</table>
|
@@ -743,9 +770,9 @@ cells.</p>
|
|
743
770
|
</div>
|
744
771
|
|
745
772
|
<div id="footer">
|
746
|
-
Generated on
|
773
|
+
Generated on Sun Nov 27 21:54:23 2011 by
|
747
774
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
748
|
-
0.7.3 (ruby-1.
|
775
|
+
0.7.3 (ruby-1.8.7).
|
749
776
|
</div>
|
750
777
|
|
751
778
|
</body>
|