axlsx 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/README.md +10 -9
  2. data/doc/Axlsx.html +2443 -0
  3. data/doc/Axlsx/App.html +2640 -0
  4. data/doc/Axlsx/Axis.html +1047 -0
  5. data/doc/Axlsx/Bar3DChart.html +1153 -0
  6. data/doc/Axlsx/BarSeries.html +764 -0
  7. data/doc/Axlsx/Border.html +775 -0
  8. data/doc/Axlsx/BorderPr.html +709 -0
  9. data/doc/Axlsx/CatAxis.html +766 -0
  10. data/doc/Axlsx/Cell.html +1623 -0
  11. data/doc/Axlsx/CellAlignment.html +1247 -0
  12. data/doc/Axlsx/CellProtection.html +565 -0
  13. data/doc/Axlsx/CellStyle.html +949 -0
  14. data/doc/Axlsx/Chart.html +1459 -0
  15. data/doc/Axlsx/Color.html +665 -0
  16. data/doc/Axlsx/ContentType.html +340 -0
  17. data/doc/Axlsx/Core.html +465 -0
  18. data/doc/Axlsx/DataTypeValidator.html +324 -0
  19. data/doc/Axlsx/Default.html +575 -0
  20. data/doc/Axlsx/Drawing.html +1154 -0
  21. data/doc/Axlsx/Fill.html +460 -0
  22. data/doc/Axlsx/Font.html +1554 -0
  23. data/doc/Axlsx/GradientFill.html +1026 -0
  24. data/doc/Axlsx/GradientStop.html +526 -0
  25. data/doc/Axlsx/GraphicFrame.html +646 -0
  26. data/doc/Axlsx/Line3DChart.html +921 -0
  27. data/doc/Axlsx/LineSeries.html +656 -0
  28. data/doc/Axlsx/Marker.html +857 -0
  29. data/doc/Axlsx/NumFmt.html +562 -0
  30. data/doc/Axlsx/Override.html +568 -0
  31. data/doc/Axlsx/Package.html +1293 -0
  32. data/doc/Axlsx/PatternFill.html +681 -0
  33. data/doc/Axlsx/Pie3DChart.html +439 -0
  34. data/doc/Axlsx/PieSeries.html +762 -0
  35. data/doc/Axlsx/RegexValidator.html +268 -0
  36. data/doc/Axlsx/Relationship.html +554 -0
  37. data/doc/Axlsx/Relationships.html +343 -0
  38. data/doc/Axlsx/RestrictionValidator.html +300 -0
  39. data/doc/Axlsx/Row.html +771 -0
  40. data/doc/Axlsx/Scaling.html +740 -0
  41. data/doc/Axlsx/SerAxis.html +624 -0
  42. data/doc/Axlsx/Series.html +746 -0
  43. data/doc/Axlsx/SeriesTitle.html +289 -0
  44. data/doc/Axlsx/SimpleTypedList.html +1617 -0
  45. data/doc/Axlsx/Styles.html +1754 -0
  46. data/doc/Axlsx/TableStyle.html +710 -0
  47. data/doc/Axlsx/TableStyleElement.html +677 -0
  48. data/doc/Axlsx/TableStyles.html +599 -0
  49. data/doc/Axlsx/Title.html +625 -0
  50. data/doc/Axlsx/TwoCellAnchor.html +1115 -0
  51. data/doc/Axlsx/ValAxis.html +539 -0
  52. data/doc/Axlsx/View3D.html +971 -0
  53. data/doc/Axlsx/Workbook.html +1347 -0
  54. data/doc/Axlsx/Worksheet.html +1864 -0
  55. data/doc/Axlsx/Xf.html +1681 -0
  56. data/doc/_index.html +611 -0
  57. data/doc/class_list.html +47 -0
  58. data/doc/css/common.css +1 -0
  59. data/doc/css/full_list.css +55 -0
  60. data/doc/css/style.css +322 -0
  61. data/doc/file.README.html +262 -0
  62. data/doc/file_list.html +49 -0
  63. data/doc/frames.html +13 -0
  64. data/doc/index.html +262 -0
  65. data/doc/js/app.js +205 -0
  66. data/doc/js/full_list.js +167 -0
  67. data/doc/js/jquery.js +16 -0
  68. data/doc/method_list.html +3038 -0
  69. data/doc/top-level-namespace.html +103 -0
  70. data/lib/axlsx/util/constants.rb +1 -1
  71. metadata +71 -3
@@ -0,0 +1,1864 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Axlsx::Worksheet
8
+
9
+ &mdash; Documentation by YARD 0.7.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ relpath = '..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../_index.html">Index (W)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../Axlsx.html" title="Axlsx (module)">Axlsx</a></span></span>
38
+ &raquo;
39
+ <span class="title">Worksheet</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Class: Axlsx::Worksheet
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+ <dt class="r1">Inherits:</dt>
68
+ <dd class="r1">
69
+ <span class="inheritName">Object</span>
70
+
71
+ <ul class="fullTree">
72
+ <li>Object</li>
73
+
74
+ <li class="next">Axlsx::Worksheet</li>
75
+
76
+ </ul>
77
+ <a href="#" class="inheritanceTree">show all</a>
78
+
79
+ </dd>
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+ <dt class="r2 last">Defined in:</dt>
90
+ <dd class="r2 last">lib/axlsx/workbook/worksheet/worksheet.rb</dd>
91
+
92
+ </dl>
93
+ <div class="clear"></div>
94
+
95
+ <h2>Overview</h2><div class="docstring">
96
+ <div class="discussion">
97
+ <p>
98
+ The Worksheet class represents a worksheet in the workbook.
99
+ </p>
100
+
101
+
102
+ </div>
103
+ </div>
104
+ <div class="tags">
105
+
106
+
107
+ </div>
108
+
109
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
110
+ <ul class="summary">
111
+
112
+ <li class="public ">
113
+ <span class="summary_signature">
114
+
115
+ <a href="#auto_fit_data-instance_method" title="#auto_fit_data (instance method)">- (Array) <strong>auto_fit_data</strong> </a>
116
+
117
+
118
+
119
+ </span>
120
+
121
+
122
+ <span class="note title readonly">readonly</span>
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ <span class="summary_desc"><div class='inline'><p>
132
+ An array of content based calculated column widths.
133
+ </p>
134
+ </div></span>
135
+
136
+ </li>
137
+
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#drawing-instance_method" title="#drawing (instance method)">- (Drawing) <strong>drawing</strong> </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+ <span class="note title readonly">readonly</span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <span class="summary_desc"><div class='inline'><p>
159
+ The drawing associated with this worksheet.
160
+ </p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ <li class="public ">
167
+ <span class="summary_signature">
168
+
169
+ <a href="#index-instance_method" title="#index (instance method)">- (Integer) <strong>index</strong> </a>
170
+
171
+
172
+
173
+ </span>
174
+
175
+
176
+ <span class="note title readonly">readonly</span>
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+ <span class="summary_desc"><div class='inline'><p>
186
+ The index of this worksheet in the owning Workbook&#8217;s worksheets list.
187
+ </p>
188
+ </div></span>
189
+
190
+ </li>
191
+
192
+
193
+ <li class="public ">
194
+ <span class="summary_signature">
195
+
196
+ <a href="#name-instance_method" title="#name (instance method)">- (String) <strong>name</strong> </a>
197
+
198
+
199
+
200
+ </span>
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+ <span class="summary_desc"><div class='inline'><p>
213
+ The name of the worksheet.
214
+ </p>
215
+ </div></span>
216
+
217
+ </li>
218
+
219
+
220
+ <li class="public ">
221
+ <span class="summary_signature">
222
+
223
+ <a href="#pn-instance_method" title="#pn (instance method)">- (String) <strong>pn</strong> </a>
224
+
225
+
226
+
227
+ </span>
228
+
229
+
230
+ <span class="note title readonly">readonly</span>
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <span class="summary_desc"><div class='inline'><p>
240
+ The part name of this worksheet.
241
+ </p>
242
+ </div></span>
243
+
244
+ </li>
245
+
246
+
247
+ <li class="public ">
248
+ <span class="summary_signature">
249
+
250
+ <a href="#relationships-instance_method" title="#relationships (instance method)">- (Object) <strong>relationships</strong> </a>
251
+
252
+
253
+
254
+ </span>
255
+
256
+
257
+ <span class="note title readonly">readonly</span>
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ <span class="summary_desc"><div class='inline'><p>
267
+ The worksheet&#8217;s relationships.
268
+ </p>
269
+ </div></span>
270
+
271
+ </li>
272
+
273
+
274
+ <li class="public ">
275
+ <span class="summary_signature">
276
+
277
+ <a href="#rels_pn-instance_method" title="#rels_pn (instance method)">- (String) <strong>rels_pn</strong> </a>
278
+
279
+
280
+
281
+ </span>
282
+
283
+
284
+ <span class="note title readonly">readonly</span>
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+ <span class="summary_desc"><div class='inline'><p>
294
+ The relationship part name of this worksheet.
295
+ </p>
296
+ </div></span>
297
+
298
+ </li>
299
+
300
+
301
+ <li class="public ">
302
+ <span class="summary_signature">
303
+
304
+ <a href="#rId-instance_method" title="#rId (instance method)">- (String) <strong>rId</strong> </a>
305
+
306
+
307
+
308
+ </span>
309
+
310
+
311
+ <span class="note title readonly">readonly</span>
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+ <span class="summary_desc"><div class='inline'><p>
321
+ The relationship Id of thiw worksheet.
322
+ </p>
323
+ </div></span>
324
+
325
+ </li>
326
+
327
+
328
+ <li class="public ">
329
+ <span class="summary_signature">
330
+
331
+ <a href="#rows-instance_method" title="#rows (instance method)">- (SimpleTypedList) <strong>rows</strong> </a>
332
+
333
+
334
+
335
+ </span>
336
+
337
+
338
+ <span class="note title readonly">readonly</span>
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+ <span class="summary_desc"><div class='inline'><p>
348
+ The rows in this worksheet.
349
+ </p>
350
+ </div></span>
351
+
352
+ </li>
353
+
354
+
355
+ <li class="public ">
356
+ <span class="summary_signature">
357
+
358
+ <a href="#workbook-instance_method" title="#workbook (instance method)">- (Workbook) <strong>workbook</strong> </a>
359
+
360
+
361
+
362
+ </span>
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+ <span class="summary_desc"><div class='inline'><p>
375
+ The workbook that owns this worksheet.
376
+ </p>
377
+ </div></span>
378
+
379
+ </li>
380
+
381
+
382
+ </ul>
383
+
384
+
385
+
386
+
387
+
388
+ <h2>
389
+ Instance Method Summary
390
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
391
+ </h2>
392
+
393
+ <ul class="summary">
394
+
395
+ <li class="public ">
396
+ <span class="summary_signature">
397
+
398
+ <a href="#add_chart-instance_method" title="#add_chart (instance method)">- (Object) <strong>add_chart</strong>(chart_type, options = {}) {|chart| ... }</a>
399
+
400
+
401
+
402
+ </span>
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+ <span class="summary_desc"><div class='inline'><p>
412
+ Adds a chart to this worksheets drawing.
413
+ </p>
414
+ </div></span>
415
+
416
+ </li>
417
+
418
+
419
+ <li class="public ">
420
+ <span class="summary_signature">
421
+
422
+ <a href="#add_row-instance_method" title="#add_row (instance method)">- (Row) <strong>add_row</strong>(values = [], options = {}) {|@rows.last| ... }</a>
423
+
424
+
425
+
426
+ </span>
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+ <span class="summary_desc"><div class='inline'><p>
436
+ Adds a row to the worksheet and updates auto fit data.
437
+ </p>
438
+ </div></span>
439
+
440
+ </li>
441
+
442
+
443
+ <li class="public ">
444
+ <span class="summary_signature">
445
+
446
+ <a href="#auto_width-instance_method" title="#auto_width (instance method)">- (Float) <strong>auto_width</strong>(col) </a>
447
+
448
+
449
+
450
+ </span>
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+ <span class="summary_desc"><div class='inline'><p>
460
+ Determines the proper width for a column based on content.
461
+ </p>
462
+ </div></span>
463
+
464
+ </li>
465
+
466
+
467
+ <li class="public ">
468
+ <span class="summary_signature">
469
+
470
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Worksheet) <strong>initialize</strong>(wb, options = {}) </a>
471
+
472
+
473
+
474
+ </span>
475
+
476
+ <span class="note title constructor">constructor</span>
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+ <span class="summary_desc"><div class='inline'><p>
486
+ Creates a new worksheet.
487
+ </p>
488
+ </div></span>
489
+
490
+ </li>
491
+
492
+
493
+ <li class="public ">
494
+ <span class="summary_signature">
495
+
496
+ <a href="#to_xml-instance_method" title="#to_xml (instance method)">- (String) <strong>to_xml</strong> </a>
497
+
498
+
499
+
500
+ </span>
501
+
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+ <span class="summary_desc"><div class='inline'><p>
510
+ Serializes the worksheet document.
511
+ </p>
512
+ </div></span>
513
+
514
+ </li>
515
+
516
+
517
+ <li class="public ">
518
+ <span class="summary_signature">
519
+
520
+ <a href="#update_auto_fit_data-instance_method" title="#update_auto_fit_data (instance method)">- (Array) <strong>update_auto_fit_data</strong>(cells) </a>
521
+
522
+
523
+
524
+ </span>
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+ <span class="summary_desc"><div class='inline'><p>
534
+ Updates auto fit data.
535
+ </p>
536
+ </div></span>
537
+
538
+ </li>
539
+
540
+
541
+ </ul>
542
+
543
+
544
+ <div id="constructor_details" class="method_details_list">
545
+ <h2>Constructor Details</h2>
546
+
547
+ <div class="method_details first">
548
+ <p class="signature first" id="initialize-instance_method">
549
+
550
+ - (<tt><span class='object_link'><a href="" title="Axlsx::Worksheet (class)">Worksheet</a></span></tt>) <strong>initialize</strong>(wb, options = {})
551
+
552
+
553
+
554
+ </p><div class="docstring">
555
+ <div class="discussion">
556
+
557
+ <div class="note notetag">
558
+ <strong>Note:</strong>
559
+ <div class='inline'><p>
560
+ the recommended way to manage worksheets is Workbook#add_worksheet
561
+ </p>
562
+ </div>
563
+ </div>
564
+
565
+ <p>
566
+ Creates a new worksheet.
567
+ </p>
568
+
569
+
570
+ </div>
571
+ </div>
572
+ <div class="tags">
573
+ <h3>Parameters:</h3>
574
+ <ul class="param">
575
+
576
+ <li>
577
+
578
+ <span class='name'>options</span>
579
+
580
+
581
+ <span class='type'>(<tt>Hash</tt>)</span>
582
+
583
+
584
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
585
+
586
+
587
+ &mdash;
588
+ <div class='inline'><p>
589
+ a customizable set of options
590
+ </p>
591
+ </div>
592
+
593
+ </li>
594
+
595
+ </ul>
596
+
597
+
598
+
599
+
600
+
601
+
602
+ <h3>Options Hash (<tt>options</tt>):</h3>
603
+ <ul class="option">
604
+
605
+ <li>
606
+ <span class="name">name</span>
607
+ <span class="type">(<tt>String</tt>)</span>
608
+ <span class="default">
609
+
610
+ </span>
611
+ &mdash; <div class='inline'><p>
612
+ The name of this sheet.
613
+ </p>
614
+ </div>
615
+ </li>
616
+
617
+ </ul>
618
+
619
+
620
+
621
+ <h3>See Also:</h3>
622
+ <ul class="see">
623
+
624
+ <li><span class='object_link'><a href="Workbook.html#add_worksheet-instance_method" title="Axlsx::Workbook#add_worksheet (method)">Axlsx::Workbook#add_worksheet</a></span></li>
625
+
626
+ </ul>
627
+
628
+ </div><table class="source_code">
629
+ <tr>
630
+ <td>
631
+ <pre class="lines">
632
+
633
+
634
+ 59
635
+ 60
636
+ 61
637
+ 62
638
+ 63
639
+ 64
640
+ 65
641
+ 66</pre>
642
+ </td>
643
+ <td>
644
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 59</span>
645
+
646
+ <span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='wb identifier id'>wb</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>
647
+ <span class='@rows ivar id'>@rows</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='Row constant id'>Row</span>
648
+ <span class='self self kw'>self</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span>
649
+ <span class='@workbook ivar id'>@workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span> <span class='lshft op'>&lt;&lt;</span> <span class='self self kw'>self</span>
650
+ <span class='@auto_fit_data ivar id'>@auto_fit_data</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
651
+ <span class='self self kw'>self</span><span class='dot token'>.</span><span class='name identifier id'>name</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:name</span><span class='rbrack token'>]</span> <span class='orop op'>||</span> <span class='string val'>&quot;Sheet&quot;</span> <span class='plus op'>+</span> <span class='lparen token'>(</span><span class='index identifier id'>index</span><span class='plus op'>+</span><span class='integer val'>1</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span>
652
+ <span class='@magick_draw ivar id'>@magick_draw</span> <span class='assign token'>=</span> <span class='Magick constant id'>Magick</span><span class='colon2 op'>::</span><span class='Draw constant id'>Draw</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
653
+ <span class='end end kw'>end</span>
654
+ </pre>
655
+ </td>
656
+ </tr>
657
+ </table>
658
+ </div>
659
+
660
+ </div>
661
+
662
+ <div id="instance_attr_details" class="attr_details">
663
+ <h2>Instance Attribute Details</h2>
664
+
665
+
666
+ <span id=""></span>
667
+ <span id="auto_fit_data-instance_method"></span>
668
+ <div class="method_details first">
669
+ <p class="signature first" id="auto_fit_data-instance_method">
670
+
671
+ - (<tt>Array</tt>) <strong>auto_fit_data</strong> <span class="extras">(readonly)</span>
672
+
673
+
674
+
675
+ </p><div class="docstring">
676
+ <div class="discussion">
677
+
678
+ <div class="note notetag">
679
+ <strong>Note:</strong>
680
+ <div class='inline'><p>
681
+ a single auto fit data item is a hash with :longest =&gt; [String] and
682
+ :sz=&gt; [Integer] members.
683
+ </p>
684
+ </div>
685
+ </div>
686
+
687
+ <p>
688
+ An array of content based calculated column widths.
689
+ </p>
690
+
691
+
692
+ </div>
693
+ </div>
694
+ <div class="tags">
695
+
696
+ <h3>Returns:</h3>
697
+ <ul class="return">
698
+
699
+ <li>
700
+
701
+
702
+ <span class='type'>(<tt>Array</tt>)</span>
703
+
704
+
705
+
706
+ &mdash;
707
+ <div class='inline'><p>
708
+ of Hash
709
+ </p>
710
+ </div>
711
+
712
+ </li>
713
+
714
+ </ul>
715
+
716
+ </div><table class="source_code">
717
+ <tr>
718
+ <td>
719
+ <pre class="lines">
720
+
721
+
722
+ 34
723
+ 35
724
+ 36</pre>
725
+ </td>
726
+ <td>
727
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 34</span>
728
+
729
+ <span class='def def kw'>def</span> <span class='auto_fit_data identifier id'>auto_fit_data</span>
730
+ <span class='@auto_fit_data ivar id'>@auto_fit_data</span>
731
+ <span class='end end kw'>end</span>
732
+ </pre>
733
+ </td>
734
+ </tr>
735
+ </table>
736
+ </div>
737
+
738
+
739
+ <span id=""></span>
740
+ <span id="drawing-instance_method"></span>
741
+ <div class="method_details ">
742
+ <p class="signature " id="drawing-instance_method">
743
+
744
+ - (<tt><span class='object_link'><a href="Drawing.html" title="Axlsx::Drawing (class)">Drawing</a></span></tt>) <strong>drawing</strong> <span class="extras">(readonly)</span>
745
+
746
+
747
+
748
+ </p><div class="docstring">
749
+ <div class="discussion">
750
+
751
+ <div class="note notetag">
752
+ <strong>Note:</strong>
753
+ <div class='inline'><p>
754
+ the recommended way to work with drawings and charts is Worksheet#add_chart
755
+ </p>
756
+ </div>
757
+ </div>
758
+
759
+ <p>
760
+ The drawing associated with this worksheet.
761
+ </p>
762
+
763
+
764
+ </div>
765
+ </div>
766
+ <div class="tags">
767
+
768
+ <h3>Returns:</h3>
769
+ <ul class="return">
770
+
771
+ <li>
772
+
773
+
774
+ <span class='type'>(<tt><span class='object_link'><a href="Drawing.html" title="Axlsx::Drawing (class)">Drawing</a></span></tt>)</span>
775
+
776
+
777
+
778
+ </li>
779
+
780
+ </ul>
781
+
782
+ <h3>See Also:</h3>
783
+ <ul class="see">
784
+
785
+ <li><span class='object_link'><a href="#add_chart-instance_method" title="Axlsx::Worksheet#add_chart (method)">#add_chart</a></span></li>
786
+
787
+ </ul>
788
+
789
+ </div><table class="source_code">
790
+ <tr>
791
+ <td>
792
+ <pre class="lines">
793
+
794
+
795
+ 29
796
+ 30
797
+ 31</pre>
798
+ </td>
799
+ <td>
800
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 29</span>
801
+
802
+ <span class='def def kw'>def</span> <span class='drawing identifier id'>drawing</span>
803
+ <span class='@drawing ivar id'>@drawing</span> <span class='orop op'>||</span> <span class='@drawing ivar id'>@drawing</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Drawing constant id'>Drawing</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='rparen token'>)</span>
804
+ <span class='end end kw'>end</span>
805
+ </pre>
806
+ </td>
807
+ </tr>
808
+ </table>
809
+ </div>
810
+
811
+
812
+ <span id=""></span>
813
+ <span id="index-instance_method"></span>
814
+ <div class="method_details ">
815
+ <p class="signature " id="index-instance_method">
816
+
817
+ - (<tt>Integer</tt>) <strong>index</strong> <span class="extras">(readonly)</span>
818
+
819
+
820
+
821
+ </p><div class="docstring">
822
+ <div class="discussion">
823
+ <p>
824
+ The index of this worksheet in the owning Workbook&#8217;s worksheets list.
825
+ </p>
826
+
827
+
828
+ </div>
829
+ </div>
830
+ <div class="tags">
831
+
832
+ <h3>Returns:</h3>
833
+ <ul class="return">
834
+
835
+ <li>
836
+
837
+
838
+ <span class='type'>(<tt>Integer</tt>)</span>
839
+
840
+
841
+
842
+ </li>
843
+
844
+ </ul>
845
+
846
+ </div><table class="source_code">
847
+ <tr>
848
+ <td>
849
+ <pre class="lines">
850
+
851
+
852
+ 50
853
+ 51
854
+ 52</pre>
855
+ </td>
856
+ <td>
857
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 50</span>
858
+
859
+ <span class='def def kw'>def</span> <span class='index identifier id'>index</span>
860
+ <span class='@workbook ivar id'>@workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='index identifier id'>index</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='rparen token'>)</span>
861
+ <span class='end end kw'>end</span>
862
+ </pre>
863
+ </td>
864
+ </tr>
865
+ </table>
866
+ </div>
867
+
868
+
869
+ <span id="name=-instance_method"></span>
870
+ <span id="name-instance_method"></span>
871
+ <div class="method_details ">
872
+ <p class="signature " id="name-instance_method">
873
+
874
+ - (<tt>String</tt>) <strong>name</strong>
875
+
876
+
877
+
878
+ </p><div class="docstring">
879
+ <div class="discussion">
880
+ <p>
881
+ The name of the worksheet
882
+ </p>
883
+
884
+
885
+ </div>
886
+ </div>
887
+ <div class="tags">
888
+
889
+ <h3>Returns:</h3>
890
+ <ul class="return">
891
+
892
+ <li>
893
+
894
+
895
+ <span class='type'>(<tt>String</tt>)</span>
896
+
897
+
898
+
899
+ </li>
900
+
901
+ </ul>
902
+
903
+ </div><table class="source_code">
904
+ <tr>
905
+ <td>
906
+ <pre class="lines">
907
+
908
+
909
+ 9
910
+ 10
911
+ 11</pre>
912
+ </td>
913
+ <td>
914
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 9</span>
915
+
916
+ <span class='def def kw'>def</span> <span class='name identifier id'>name</span>
917
+ <span class='@name ivar id'>@name</span>
918
+ <span class='end end kw'>end</span>
919
+ </pre>
920
+ </td>
921
+ </tr>
922
+ </table>
923
+ </div>
924
+
925
+
926
+ <span id=""></span>
927
+ <span id="pn-instance_method"></span>
928
+ <div class="method_details ">
929
+ <p class="signature " id="pn-instance_method">
930
+
931
+ - (<tt>String</tt>) <strong>pn</strong> <span class="extras">(readonly)</span>
932
+
933
+
934
+
935
+ </p><div class="docstring">
936
+ <div class="discussion">
937
+ <p>
938
+ The part name of this worksheet
939
+ </p>
940
+
941
+
942
+ </div>
943
+ </div>
944
+ <div class="tags">
945
+
946
+ <h3>Returns:</h3>
947
+ <ul class="return">
948
+
949
+ <li>
950
+
951
+
952
+ <span class='type'>(<tt>String</tt>)</span>
953
+
954
+
955
+
956
+ </li>
957
+
958
+ </ul>
959
+
960
+ </div><table class="source_code">
961
+ <tr>
962
+ <td>
963
+ <pre class="lines">
964
+
965
+
966
+ 38
967
+ 39
968
+ 40</pre>
969
+ </td>
970
+ <td>
971
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 38</span>
972
+
973
+ <span class='def def kw'>def</span> <span class='pn identifier id'>pn</span>
974
+ <span class='dstring node'>&quot;#{WORKSHEET_PN % (index+1)}&quot;</span>
975
+ <span class='end end kw'>end</span>
976
+ </pre>
977
+ </td>
978
+ </tr>
979
+ </table>
980
+ </div>
981
+
982
+
983
+ <span id=""></span>
984
+ <span id="relationships-instance_method"></span>
985
+ <div class="method_details ">
986
+ <p class="signature " id="relationships-instance_method">
987
+
988
+ - (<tt>Object</tt>) <strong>relationships</strong> <span class="extras">(readonly)</span>
989
+
990
+
991
+
992
+ </p><div class="docstring">
993
+ <div class="discussion">
994
+ <p>
995
+ The worksheet&#8217;s relationships.
996
+ </p>
997
+
998
+
999
+ </div>
1000
+ </div>
1001
+ <div class="tags">
1002
+
1003
+
1004
+ </div><table class="source_code">
1005
+ <tr>
1006
+ <td>
1007
+ <pre class="lines">
1008
+
1009
+
1010
+ 17
1011
+ 18
1012
+ 19
1013
+ 20
1014
+ 21</pre>
1015
+ </td>
1016
+ <td>
1017
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 17</span>
1018
+
1019
+ <span class='def def kw'>def</span> <span class='relationships identifier id'>relationships</span>
1020
+ <span class='r identifier id'>r</span> <span class='assign token'>=</span> <span class='Relationships constant id'>Relationships</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
1021
+ <span class='r identifier id'>r</span> <span class='lshft op'>&lt;&lt;</span> <span class='Relationship constant id'>Relationship</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='DRAWING_R constant id'>DRAWING_R</span><span class='comma token'>,</span> <span class='dstring node'>&quot;../#{@drawing.pn}&quot;</span><span class='rparen token'>)</span> <span class='if if_mod kw'>if</span> <span class='@drawing ivar id'>@drawing</span>
1022
+ <span class='r identifier id'>r</span>
1023
+ <span class='end end kw'>end</span>
1024
+ </pre>
1025
+ </td>
1026
+ </tr>
1027
+ </table>
1028
+ </div>
1029
+
1030
+
1031
+ <span id=""></span>
1032
+ <span id="rels_pn-instance_method"></span>
1033
+ <div class="method_details ">
1034
+ <p class="signature " id="rels_pn-instance_method">
1035
+
1036
+ - (<tt>String</tt>) <strong>rels_pn</strong> <span class="extras">(readonly)</span>
1037
+
1038
+
1039
+
1040
+ </p><div class="docstring">
1041
+ <div class="discussion">
1042
+ <p>
1043
+ The relationship part name of this worksheet
1044
+ </p>
1045
+
1046
+
1047
+ </div>
1048
+ </div>
1049
+ <div class="tags">
1050
+
1051
+ <h3>Returns:</h3>
1052
+ <ul class="return">
1053
+
1054
+ <li>
1055
+
1056
+
1057
+ <span class='type'>(<tt>String</tt>)</span>
1058
+
1059
+
1060
+
1061
+ </li>
1062
+
1063
+ </ul>
1064
+
1065
+ </div><table class="source_code">
1066
+ <tr>
1067
+ <td>
1068
+ <pre class="lines">
1069
+
1070
+
1071
+ 42
1072
+ 43
1073
+ 44</pre>
1074
+ </td>
1075
+ <td>
1076
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 42</span>
1077
+
1078
+ <span class='def def kw'>def</span> <span class='rels_pn identifier id'>rels_pn</span>
1079
+ <span class='dstring node'>&quot;#{WORKSHEET_RELS_PN % (index+1)}&quot;</span>
1080
+ <span class='end end kw'>end</span>
1081
+ </pre>
1082
+ </td>
1083
+ </tr>
1084
+ </table>
1085
+ </div>
1086
+
1087
+
1088
+ <span id=""></span>
1089
+ <span id="rId-instance_method"></span>
1090
+ <div class="method_details ">
1091
+ <p class="signature " id="rId-instance_method">
1092
+
1093
+ - (<tt>String</tt>) <strong>rId</strong> <span class="extras">(readonly)</span>
1094
+
1095
+
1096
+
1097
+ </p><div class="docstring">
1098
+ <div class="discussion">
1099
+ <p>
1100
+ The relationship Id of thiw worksheet
1101
+ </p>
1102
+
1103
+
1104
+ </div>
1105
+ </div>
1106
+ <div class="tags">
1107
+
1108
+ <h3>Returns:</h3>
1109
+ <ul class="return">
1110
+
1111
+ <li>
1112
+
1113
+
1114
+ <span class='type'>(<tt>String</tt>)</span>
1115
+
1116
+
1117
+
1118
+ </li>
1119
+
1120
+ </ul>
1121
+
1122
+ </div><table class="source_code">
1123
+ <tr>
1124
+ <td>
1125
+ <pre class="lines">
1126
+
1127
+
1128
+ 46
1129
+ 47
1130
+ 48</pre>
1131
+ </td>
1132
+ <td>
1133
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 46</span>
1134
+
1135
+ <span class='def def kw'>def</span> <span class='rId identifier id'>rId</span>
1136
+ <span class='dstring node'>&quot;rId#{index+1}&quot;</span>
1137
+ <span class='end end kw'>end</span>
1138
+ </pre>
1139
+ </td>
1140
+ </tr>
1141
+ </table>
1142
+ </div>
1143
+
1144
+
1145
+ <span id=""></span>
1146
+ <span id="rows-instance_method"></span>
1147
+ <div class="method_details ">
1148
+ <p class="signature " id="rows-instance_method">
1149
+
1150
+ - (<tt><span class='object_link'><a href="SimpleTypedList.html" title="Axlsx::SimpleTypedList (class)">SimpleTypedList</a></span></tt>) <strong>rows</strong> <span class="extras">(readonly)</span>
1151
+
1152
+
1153
+
1154
+ </p><div class="docstring">
1155
+ <div class="discussion">
1156
+
1157
+ <div class="note notetag">
1158
+ <strong>Note:</strong>
1159
+ <div class='inline'><p>
1160
+ The recommended way to manage rows is Worksheet#add_row
1161
+ </p>
1162
+ </div>
1163
+ </div>
1164
+
1165
+ <p>
1166
+ The rows in this worksheet
1167
+ </p>
1168
+
1169
+
1170
+ </div>
1171
+ </div>
1172
+ <div class="tags">
1173
+
1174
+ <h3>Returns:</h3>
1175
+ <ul class="return">
1176
+
1177
+ <li>
1178
+
1179
+
1180
+ <span class='type'>(<tt><span class='object_link'><a href="SimpleTypedList.html" title="Axlsx::SimpleTypedList (class)">SimpleTypedList</a></span></tt>)</span>
1181
+
1182
+
1183
+
1184
+ </li>
1185
+
1186
+ </ul>
1187
+
1188
+ <h3>See Also:</h3>
1189
+ <ul class="see">
1190
+
1191
+ <li><span class='object_link'><a href="#add_row-instance_method" title="Axlsx::Worksheet#add_row (method)">#add_row</a></span></li>
1192
+
1193
+ </ul>
1194
+
1195
+ </div><table class="source_code">
1196
+ <tr>
1197
+ <td>
1198
+ <pre class="lines">
1199
+
1200
+
1201
+ 23
1202
+ 24
1203
+ 25</pre>
1204
+ </td>
1205
+ <td>
1206
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 23</span>
1207
+
1208
+ <span class='def def kw'>def</span> <span class='rows identifier id'>rows</span>
1209
+ <span class='@rows ivar id'>@rows</span>
1210
+ <span class='end end kw'>end</span>
1211
+ </pre>
1212
+ </td>
1213
+ </tr>
1214
+ </table>
1215
+ </div>
1216
+
1217
+
1218
+ <span id="workbook=-instance_method"></span>
1219
+ <span id="workbook-instance_method"></span>
1220
+ <div class="method_details ">
1221
+ <p class="signature " id="workbook-instance_method">
1222
+
1223
+ - (<tt><span class='object_link'><a href="Workbook.html" title="Axlsx::Workbook (class)">Workbook</a></span></tt>) <strong>workbook</strong>
1224
+
1225
+
1226
+
1227
+ </p><div class="docstring">
1228
+ <div class="discussion">
1229
+ <p>
1230
+ The workbook that owns this worksheet
1231
+ </p>
1232
+
1233
+
1234
+ </div>
1235
+ </div>
1236
+ <div class="tags">
1237
+
1238
+ <h3>Returns:</h3>
1239
+ <ul class="return">
1240
+
1241
+ <li>
1242
+
1243
+
1244
+ <span class='type'>(<tt><span class='object_link'><a href="Workbook.html" title="Axlsx::Workbook (class)">Workbook</a></span></tt>)</span>
1245
+
1246
+
1247
+
1248
+ </li>
1249
+
1250
+ </ul>
1251
+
1252
+ </div><table class="source_code">
1253
+ <tr>
1254
+ <td>
1255
+ <pre class="lines">
1256
+
1257
+
1258
+ 13
1259
+ 14
1260
+ 15</pre>
1261
+ </td>
1262
+ <td>
1263
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 13</span>
1264
+
1265
+ <span class='def def kw'>def</span> <span class='workbook identifier id'>workbook</span>
1266
+ <span class='@workbook ivar id'>@workbook</span>
1267
+ <span class='end end kw'>end</span>
1268
+ </pre>
1269
+ </td>
1270
+ </tr>
1271
+ </table>
1272
+ </div>
1273
+
1274
+ </div>
1275
+
1276
+
1277
+ <div id="instance_method_details" class="method_details_list">
1278
+ <h2>Instance Method Details</h2>
1279
+
1280
+
1281
+ <div class="method_details first">
1282
+ <p class="signature first" id="add_chart-instance_method">
1283
+
1284
+ - (<tt>Object</tt>) <strong>add_chart</strong>(chart_type, options = {}) {|chart| ... }
1285
+
1286
+
1287
+
1288
+ </p><div class="docstring">
1289
+ <div class="discussion">
1290
+ <p>
1291
+ Adds a chart to this worksheets drawing.
1292
+ </p>
1293
+
1294
+
1295
+ </div>
1296
+ </div>
1297
+ <div class="tags">
1298
+ <h3>Parameters:</h3>
1299
+ <ul class="param">
1300
+
1301
+ <li>
1302
+
1303
+ <span class='name'>chart_type</span>
1304
+
1305
+
1306
+ <span class='type'>(<tt>Class</tt>)</span>
1307
+
1308
+
1309
+
1310
+ </li>
1311
+
1312
+ <li>
1313
+
1314
+ <span class='name'>options</span>
1315
+
1316
+
1317
+ <span class='type'>(<tt>Hash</tt>)</span>
1318
+
1319
+
1320
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1321
+
1322
+
1323
+ &mdash;
1324
+ <div class='inline'><p>
1325
+ a customizable set of options
1326
+ </p>
1327
+ </div>
1328
+
1329
+ </li>
1330
+
1331
+ </ul>
1332
+
1333
+
1334
+
1335
+
1336
+
1337
+
1338
+ <h3>Options Hash (<tt>options</tt>):</h3>
1339
+ <ul class="option">
1340
+
1341
+ <li>
1342
+ <span class="name">start_at</span>
1343
+ <span class="type">(<tt>Array</tt>)</span>
1344
+ <span class="default">
1345
+
1346
+ </span>
1347
+
1348
+ </li>
1349
+
1350
+ <li>
1351
+ <span class="name">end_at</span>
1352
+ <span class="type">(<tt>Array</tt>)</span>
1353
+ <span class="default">
1354
+
1355
+ </span>
1356
+
1357
+ </li>
1358
+
1359
+ <li>
1360
+ <span class="name">title</span>
1361
+ <span class="type">(<tt><span class='object_link'><a href="Cell.html" title="Axlsx::Cell (class)">Cell</a></span></tt>, <tt>String</tt>)</span>
1362
+ <span class="default">
1363
+
1364
+ </span>
1365
+
1366
+ </li>
1367
+
1368
+ </ul>
1369
+
1370
+
1371
+ <h3>Yields:</h3>
1372
+ <ul class="yield">
1373
+
1374
+ <li>
1375
+
1376
+
1377
+ <span class='type'>(<tt>chart</tt>)</span>
1378
+
1379
+
1380
+
1381
+ </li>
1382
+
1383
+ </ul>
1384
+
1385
+ </div><table class="source_code">
1386
+ <tr>
1387
+ <td>
1388
+ <pre class="lines">
1389
+
1390
+
1391
+ 108
1392
+ 109
1393
+ 110
1394
+ 111
1395
+ 112</pre>
1396
+ </td>
1397
+ <td>
1398
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 108</span>
1399
+
1400
+ <span class='def def kw'>def</span> <span class='add_chart identifier id'>add_chart</span><span class='lparen token'>(</span><span class='chart_type identifier id'>chart_type</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>
1401
+ <span class='chart identifier id'>chart</span> <span class='assign token'>=</span> <span class='drawing identifier id'>drawing</span><span class='dot token'>.</span><span class='add_chart identifier id'>add_chart</span><span class='lparen token'>(</span><span class='chart_type identifier id'>chart_type</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='rparen token'>)</span>
1402
+ <span class='yield yield kw'>yield</span> <span class='chart identifier id'>chart</span> <span class='if if_mod kw'>if</span> <span class='block_given? fid id'>block_given?</span>
1403
+ <span class='chart identifier id'>chart</span>
1404
+ <span class='end end kw'>end</span>
1405
+ </pre>
1406
+ </td>
1407
+ </tr>
1408
+ </table>
1409
+ </div>
1410
+
1411
+ <div class="method_details ">
1412
+ <p class="signature " id="add_row-instance_method">
1413
+
1414
+ - (<tt><span class='object_link'><a href="Row.html" title="Axlsx::Row (class)">Row</a></span></tt>) <strong>add_row</strong>(values = [], options = {}) {|@rows.last| ... }
1415
+
1416
+
1417
+
1418
+ </p><div class="docstring">
1419
+ <div class="discussion">
1420
+ <p>
1421
+ Adds a row to the worksheet and updates auto fit data
1422
+ </p>
1423
+
1424
+
1425
+ </div>
1426
+ </div>
1427
+ <div class="tags">
1428
+ <h3>Parameters:</h3>
1429
+ <ul class="param">
1430
+
1431
+ <li>
1432
+
1433
+ <span class='name'>options</span>
1434
+
1435
+
1436
+ <span class='type'>(<tt>Hash</tt>)</span>
1437
+
1438
+
1439
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1440
+
1441
+
1442
+ &mdash;
1443
+ <div class='inline'><p>
1444
+ a customizable set of options
1445
+ </p>
1446
+ </div>
1447
+
1448
+ </li>
1449
+
1450
+ </ul>
1451
+
1452
+
1453
+
1454
+
1455
+
1456
+
1457
+ <h3>Options Hash (<tt>options</tt>):</h3>
1458
+ <ul class="option">
1459
+
1460
+ <li>
1461
+ <span class="name">values</span>
1462
+ <span class="type">(<tt>Array</tt>)</span>
1463
+ <span class="default">
1464
+
1465
+ </span>
1466
+
1467
+ </li>
1468
+
1469
+ <li>
1470
+ <span class="name">types</span>
1471
+ <span class="type">(<tt>Array</tt>, <tt>Symbol</tt>)</span>
1472
+ <span class="default">
1473
+
1474
+ </span>
1475
+
1476
+ </li>
1477
+
1478
+ <li>
1479
+ <span class="name">style</span>
1480
+ <span class="type">(<tt>Array</tt>, <tt>Integer</tt>)</span>
1481
+ <span class="default">
1482
+
1483
+ </span>
1484
+
1485
+ </li>
1486
+
1487
+ </ul>
1488
+
1489
+
1490
+ <h3>Yields:</h3>
1491
+ <ul class="yield">
1492
+
1493
+ <li>
1494
+
1495
+
1496
+ <span class='type'>(<tt>@rows.last</tt>)</span>
1497
+
1498
+
1499
+
1500
+ </li>
1501
+
1502
+ </ul>
1503
+ <h3>Returns:</h3>
1504
+ <ul class="return">
1505
+
1506
+ <li>
1507
+
1508
+
1509
+ <span class='type'>(<tt><span class='object_link'><a href="Row.html" title="Axlsx::Row (class)">Row</a></span></tt>)</span>
1510
+
1511
+
1512
+
1513
+ </li>
1514
+
1515
+ </ul>
1516
+
1517
+ </div><table class="source_code">
1518
+ <tr>
1519
+ <td>
1520
+ <pre class="lines">
1521
+
1522
+
1523
+ 96
1524
+ 97
1525
+ 98
1526
+ 99
1527
+ 100
1528
+ 101</pre>
1529
+ </td>
1530
+ <td>
1531
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 96</span>
1532
+
1533
+ <span class='def def kw'>def</span> <span class='add_row identifier id'>add_row</span><span class='lparen token'>(</span><span class='values identifier id'>values</span><span class='assign token'>=</span><span class='lbrack token'>[</span><span class='rbrack token'>]</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>
1534
+ <span class='Row constant id'>Row</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='comma token'>,</span> <span class='values identifier id'>values</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='rparen token'>)</span>
1535
+ <span class='update_auto_fit_data identifier id'>update_auto_fit_data</span> <span class='@rows ivar id'>@rows</span><span class='dot token'>.</span><span class='last identifier id'>last</span><span class='dot token'>.</span><span class='cells identifier id'>cells</span>
1536
+ <span class='yield yield kw'>yield</span> <span class='@rows ivar id'>@rows</span><span class='dot token'>.</span><span class='last identifier id'>last</span> <span class='if if_mod kw'>if</span> <span class='block_given? fid id'>block_given?</span>
1537
+ <span class='@rows ivar id'>@rows</span><span class='dot token'>.</span><span class='last identifier id'>last</span>
1538
+ <span class='end end kw'>end</span>
1539
+ </pre>
1540
+ </td>
1541
+ </tr>
1542
+ </table>
1543
+ </div>
1544
+
1545
+ <div class="method_details ">
1546
+ <p class="signature " id="auto_width-instance_method">
1547
+
1548
+ - (<tt>Float</tt>) <strong>auto_width</strong>(col)
1549
+
1550
+
1551
+
1552
+ </p><div class="docstring">
1553
+ <div class="discussion">
1554
+
1555
+ <div class="note notetag">
1556
+ <strong>Note:</strong>
1557
+ <div class='inline'><p>
1558
+ From ECMA docs
1559
+ </p>
1560
+ <pre class="code">
1561
+ <span class='Column constant id'>Column</span> <span class='width identifier id'>width</span> <span class='measured identifier id'>measured</span> <span class='as identifier id'>as</span> <span class='the identifier id'>the</span> <span class='number identifier id'>number</span> <span class='of identifier id'>of</span> <span class='characters identifier id'>characters</span> <span class='of identifier id'>of</span> <span class='the identifier id'>the</span> <span class='maximum identifier id'>maximum</span> <span class='digit identifier id'>digit</span> <span class='width identifier id'>width</span> <span class='of identifier id'>of</span> <span class='the identifier id'>the</span> <span class='numbers identifier id'>numbers</span> <span class='integer val'>0</span> <span class='dot2 op'>..</span> <span class='integer val'>9</span> <span class='as identifier id'>as</span>
1562
+ <span class='rendered identifier id'>rendered</span> <span class='in in kw'>in</span> <span class='the identifier id'>the</span> <span class='normal identifier id'>normal</span> <span class='style identifier id'>style</span><span class='string val'>'s font. There are 4 pixels of margin padding (two on each side), plus 1 pixel padding for the gridlines.
1563
+ width = Truncate([{Number of Characters} * {Maximum Digit Width} + {5 pixel padding}]/{Maximum Digit Width}*256)/256
1564
+ </span></pre>
1565
+ </div>
1566
+ </div>
1567
+
1568
+ <p>
1569
+ Determines the proper width for a column based on content.
1570
+ </p>
1571
+
1572
+
1573
+ </div>
1574
+ </div>
1575
+ <div class="tags">
1576
+ <h3>Parameters:</h3>
1577
+ <ul class="param">
1578
+
1579
+ <li>
1580
+
1581
+ <span class='name'>A</span>
1582
+
1583
+
1584
+ <span class='type'>(<tt>Hash</tt>)</span>
1585
+
1586
+
1587
+
1588
+ &mdash;
1589
+ <div class='inline'><p>
1590
+ hash of auto_fit_data
1591
+ </p>
1592
+ </div>
1593
+
1594
+ </li>
1595
+
1596
+ </ul>
1597
+
1598
+ <h3>Returns:</h3>
1599
+ <ul class="return">
1600
+
1601
+ <li>
1602
+
1603
+
1604
+ <span class='type'>(<tt>Float</tt>)</span>
1605
+
1606
+
1607
+
1608
+ </li>
1609
+
1610
+ </ul>
1611
+
1612
+ </div><table class="source_code">
1613
+ <tr>
1614
+ <td>
1615
+ <pre class="lines">
1616
+
1617
+
1618
+ 182
1619
+ 183
1620
+ 184
1621
+ 185
1622
+ 186
1623
+ 187
1624
+ 188
1625
+ 189
1626
+ 190
1627
+ 191</pre>
1628
+ </td>
1629
+ <td>
1630
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 182</span>
1631
+
1632
+ <span class='def def kw'>def</span> <span class='auto_width identifier id'>auto_width</span><span class='lparen token'>(</span><span class='col identifier id'>col</span><span class='rparen token'>)</span>
1633
+ <span class='mdw identifier id'>mdw</span> <span class='assign token'>=</span> <span class='float val'>6.0</span> <span class='comment val'># maximum digit with is always 6.0 in testable fonts so instead of beating RMagick every time, I am hardcoding it here.</span>
1634
+ <span class='mdw_count identifier id'>mdw_count</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
1635
+ <span class='best_guess identifier id'>best_guess</span> <span class='assign token'>=</span> <span class='float val'>1.5</span> <span class='comment val'>#direct testing shows the results of the documented formula to be a bit too small. This is a best guess scaling</span>
1636
+ <span class='font_scale identifier id'>font_scale</span> <span class='assign token'>=</span> <span class='col identifier id'>col</span><span class='lbrack token'>[</span><span class='symbol val'>:sz</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='div op'>/</span> <span class='lparen token'>(</span><span class='self self kw'>self</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='fonts identifier id'>fonts</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='sz identifier id'>sz</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='orop op'>||</span> <span class='float val'>11.0</span><span class='rparen token'>)</span>
1637
+ <span class='col identifier id'>col</span><span class='lbrack token'>[</span><span class='symbol val'>:longest</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='scan identifier id'>scan</span><span class='lparen token'>(</span><span class='regexp val'>/./</span><span class='mu identifier id'>mu</span><span class='rparen 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='i identifier id'>i</span><span class='bitor op'>|</span>
1638
+ <span class='mdw_count identifier id'>mdw_count</span> <span class='opasgn op'>+=</span><span class='integer val'>1</span> <span class='if if_mod kw'>if</span> <span class='@magick_draw ivar id'>@magick_draw</span><span class='dot token'>.</span><span class='get_type_metrics identifier id'>get_type_metrics</span><span class='lparen token'>(</span><span class='i identifier id'>i</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='width identifier id'>width</span> <span class='geq op'>&gt;=</span> <span class='mdw identifier id'>mdw</span>
1639
+ <span class='end end kw'>end</span>
1640
+ <span class='lparen token'>(</span><span class='lparen token'>(</span><span class='mdw_count identifier id'>mdw_count</span> <span class='mult op'>*</span> <span class='mdw identifier id'>mdw</span> <span class='plus op'>+</span> <span class='integer val'>5</span><span class='rparen token'>)</span> <span class='div op'>/</span> <span class='mdw identifier id'>mdw</span> <span class='mult op'>*</span> <span class='integer val'>256</span><span class='rparen token'>)</span> <span class='div op'>/</span> <span class='float val'>256.0</span> <span class='mult op'>*</span> <span class='best_guess identifier id'>best_guess</span> <span class='mult op'>*</span> <span class='font_scale identifier id'>font_scale</span>
1641
+ <span class='end end kw'>end</span>
1642
+ </pre>
1643
+ </td>
1644
+ </tr>
1645
+ </table>
1646
+ </div>
1647
+
1648
+ <div class="method_details ">
1649
+ <p class="signature " id="to_xml-instance_method">
1650
+
1651
+ - (<tt>String</tt>) <strong>to_xml</strong>
1652
+
1653
+
1654
+
1655
+ </p><div class="docstring">
1656
+ <div class="discussion">
1657
+ <p>
1658
+ Serializes the worksheet document
1659
+ </p>
1660
+
1661
+
1662
+ </div>
1663
+ </div>
1664
+ <div class="tags">
1665
+
1666
+ <h3>Returns:</h3>
1667
+ <ul class="return">
1668
+
1669
+ <li>
1670
+
1671
+
1672
+ <span class='type'>(<tt>String</tt>)</span>
1673
+
1674
+
1675
+
1676
+ </li>
1677
+
1678
+ </ul>
1679
+
1680
+ </div><table class="source_code">
1681
+ <tr>
1682
+ <td>
1683
+ <pre class="lines">
1684
+
1685
+
1686
+ 116
1687
+ 117
1688
+ 118
1689
+ 119
1690
+ 120
1691
+ 121
1692
+ 122
1693
+ 123
1694
+ 124
1695
+ 125
1696
+ 126
1697
+ 127
1698
+ 128
1699
+ 129
1700
+ 130
1701
+ 131
1702
+ 132
1703
+ 133
1704
+ 134
1705
+ 135
1706
+ 136</pre>
1707
+ </td>
1708
+ <td>
1709
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 116</span>
1710
+
1711
+ <span class='def def kw'>def</span> <span class='to_xml identifier id'>to_xml</span>
1712
+ <span class='builder identifier id'>builder</span> <span class='assign token'>=</span> <span class='Nokogiri constant id'>Nokogiri</span><span class='colon2 op'>::</span><span class='XML constant id'>XML</span><span class='colon2 op'>::</span><span class='Builder constant id'>Builder</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:encoding</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='ENCODING constant id'>ENCODING</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='xml identifier id'>xml</span><span class='bitor op'>|</span>
1713
+ <span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='worksheet identifier id'>worksheet</span><span class='lparen token'>(</span><span class='symbol val'>:xmlns</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='XML_NS constant id'>XML_NS</span><span class='comma token'>,</span> <span class='symbol val'>:'xmlns:r'</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='XML_NS_R constant id'>XML_NS_R</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span>
1714
+ <span class='if if kw'>if</span> <span class='@auto_fit_data ivar id'>@auto_fit_data</span><span class='dot token'>.</span><span class='size identifier id'>size</span> <span class='gt op'>&gt;</span> <span class='integer val'>0</span>
1715
+ <span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='cols identifier id'>cols</span> <span class='lbrace token'>{</span>
1716
+ <span class='@auto_fit_data ivar id'>@auto_fit_data</span><span class='dot token'>.</span><span class='each_with_index identifier id'>each_with_index</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='col identifier id'>col</span><span class='comma token'>,</span> <span class='index identifier id'>index</span><span class='bitor op'>|</span>
1717
+ <span class='min_max identifier id'>min_max</span> <span class='assign token'>=</span> <span class='index identifier id'>index</span><span class='plus op'>+</span><span class='integer val'>1</span>
1718
+ <span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='col identifier id'>col</span><span class='lparen token'>(</span><span class='symbol val'>:min=</span><span class='gt op'>&gt;</span><span class='min_max identifier id'>min_max</span><span class='comma token'>,</span> <span class='symbol val'>:max=</span><span class='gt op'>&gt;</span><span class='min_max identifier id'>min_max</span><span class='comma token'>,</span> <span class='symbol val'>:width</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='auto_width identifier id'>auto_width</span><span class='lparen token'>(</span><span class='col identifier id'>col</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='symbol val'>:customWidth=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;true&quot;</span><span class='rparen token'>)</span>
1719
+ <span class='end end kw'>end</span>
1720
+ <span class='rbrace token'>}</span>
1721
+ <span class='end end kw'>end</span>
1722
+ <span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='sheetData identifier id'>sheetData</span> <span class='lbrace token'>{</span>
1723
+ <span class='@rows ivar id'>@rows</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='row identifier id'>row</span><span class='bitor op'>|</span>
1724
+ <span class='row identifier id'>row</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>
1725
+ <span class='end end kw'>end</span>
1726
+ <span class='rbrace token'>}</span>
1727
+ <span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='drawing identifier id'>drawing</span> <span class='symbol val'>:&quot;r:id&quot;</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;rId1&quot;</span> <span class='if if_mod kw'>if</span> <span class='@drawing ivar id'>@drawing</span>
1728
+ <span class='rbrace token'>}</span>
1729
+ <span class='end end kw'>end</span>
1730
+ <span class='builder identifier id'>builder</span><span class='dot token'>.</span><span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='symbol val'>:indent=</span><span class='gt op'>&gt;</span><span class='integer val'>0</span><span class='comma token'>,</span> <span class='symbol val'>:save_with=</span><span class='gt op'>&gt;</span><span class='integer val'>0</span><span class='rparen token'>)</span>
1731
+ <span class='end end kw'>end</span>
1732
+ </pre>
1733
+ </td>
1734
+ </tr>
1735
+ </table>
1736
+ </div>
1737
+
1738
+ <div class="method_details ">
1739
+ <p class="signature " id="update_auto_fit_data-instance_method">
1740
+
1741
+ - (<tt>Array</tt>) <strong>update_auto_fit_data</strong>(cells)
1742
+
1743
+
1744
+
1745
+ </p><div class="docstring">
1746
+ <div class="discussion">
1747
+ <p>
1748
+ Updates auto fit data. Autofit data attempts to determine the cell in a
1749
+ column that has the greatest width by comparing the length of the text
1750
+ multiplied by the size of the font.
1751
+ </p>
1752
+
1753
+
1754
+ </div>
1755
+ </div>
1756
+ <div class="tags">
1757
+ <h3>Parameters:</h3>
1758
+ <ul class="param">
1759
+
1760
+ <li>
1761
+
1762
+ <span class='name'>cells</span>
1763
+
1764
+
1765
+ <span class='type'>(<tt>Array</tt>)</span>
1766
+
1767
+
1768
+
1769
+ &mdash;
1770
+ <div class='inline'><p>
1771
+ an array of cells
1772
+ </p>
1773
+ </div>
1774
+
1775
+ </li>
1776
+
1777
+ </ul>
1778
+
1779
+ <h3>Returns:</h3>
1780
+ <ul class="return">
1781
+
1782
+ <li>
1783
+
1784
+
1785
+ <span class='type'>(<tt>Array</tt>)</span>
1786
+
1787
+
1788
+
1789
+ &mdash;
1790
+ <div class='inline'><p>
1791
+ of Cell objects
1792
+ </p>
1793
+ </div>
1794
+
1795
+ </li>
1796
+
1797
+ </ul>
1798
+
1799
+ </div><table class="source_code">
1800
+ <tr>
1801
+ <td>
1802
+ <pre class="lines">
1803
+
1804
+
1805
+ 154
1806
+ 155
1807
+ 156
1808
+ 157
1809
+ 158
1810
+ 159
1811
+ 160
1812
+ 161
1813
+ 162
1814
+ 163
1815
+ 164
1816
+ 165
1817
+ 166
1818
+ 167
1819
+ 168
1820
+ 169
1821
+ 170
1822
+ 171
1823
+ 172</pre>
1824
+ </td>
1825
+ <td>
1826
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 154</span>
1827
+
1828
+ <span class='def def kw'>def</span> <span class='update_auto_fit_data identifier id'>update_auto_fit_data</span><span class='lparen token'>(</span><span class='cells identifier id'>cells</span><span class='rparen token'>)</span>
1829
+ <span class='styles identifier id'>styles</span> <span class='assign token'>=</span> <span class='self self kw'>self</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>
1830
+ <span class='cellXfs identifier id'>cellXfs</span><span class='comma token'>,</span> <span class='fonts identifier id'>fonts</span> <span class='assign token'>=</span> <span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='cellXfs identifier id'>cellXfs</span><span class='comma token'>,</span> <span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='fonts identifier id'>fonts</span>
1831
+ <span class='sz identifier id'>sz</span> <span class='assign token'>=</span> <span class='fonts identifier id'>fonts</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='sz identifier id'>sz</span>
1832
+
1833
+ <span class='cells identifier id'>cells</span><span class='dot token'>.</span><span class='each_with_index identifier id'>each_with_index</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='item identifier id'>item</span><span class='comma token'>,</span> <span class='index identifier id'>index</span><span class='bitor op'>|</span>
1834
+ <span class='col identifier id'>col</span> <span class='assign token'>=</span> <span class='@auto_fit_data ivar id'>@auto_fit_data</span><span class='lbrack token'>[</span><span class='index identifier id'>index</span><span class='rbrack token'>]</span> <span class='orop op'>||</span> <span class='lbrace token'>{</span><span class='symbol val'>:longest=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:sz=</span><span class='gt op'>&gt;</span><span class='sz identifier id'>sz</span><span class='rbrace token'>}</span>
1835
+ <span class='cell_xf identifier id'>cell_xf</span> <span class='assign token'>=</span> <span class='cellXfs identifier id'>cellXfs</span><span class='lbrack token'>[</span><span class='item identifier id'>item</span><span class='dot token'>.</span><span class='style identifier id'>style</span><span class='rbrack token'>]</span>
1836
+ <span class='font identifier id'>font</span> <span class='assign token'>=</span> <span class='fonts identifier id'>fonts</span><span class='lbrack token'>[</span><span class='cell_xf identifier id'>cell_xf</span><span class='dot token'>.</span><span class='fontId identifier id'>fontId</span> <span class='orop op'>||</span> <span class='integer val'>0</span><span class='rbrack token'>]</span>
1837
+ <span class='sz identifier id'>sz</span> <span class='assign token'>=</span> <span class='font identifier id'>font</span><span class='dot token'>.</span><span class='sz identifier id'>sz</span> <span class='orop op'>||</span> <span class='sz identifier id'>sz</span>
1838
+
1839
+ <span class='if if kw'>if</span> <span class='lparen token'>(</span><span class='col identifier id'>col</span><span class='lbrack token'>[</span><span class='symbol val'>:longest</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='scan identifier id'>scan</span><span class='lparen token'>(</span><span class='regexp val'>/./</span><span class='mu identifier id'>mu</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='size identifier id'>size</span> <span class='mult op'>*</span> <span class='col identifier id'>col</span><span class='lbrack token'>[</span><span class='symbol val'>:sz</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> <span class='lt op'>&lt;</span> <span class='lparen token'>(</span><span class='item identifier id'>item</span><span class='dot token'>.</span><span class='value identifier id'>value</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span><span class='dot token'>.</span><span class='scan identifier id'>scan</span><span class='lparen token'>(</span><span class='regexp val'>/./</span><span class='mu identifier id'>mu</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='size identifier id'>size</span> <span class='mult op'>*</span> <span class='sz identifier id'>sz</span><span class='rparen token'>)</span>
1840
+ <span class='col identifier id'>col</span><span class='lbrack token'>[</span><span class='symbol val'>:sz</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='sz identifier id'>sz</span>
1841
+ <span class='col identifier id'>col</span><span class='lbrack token'>[</span><span class='symbol val'>:longest</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='item identifier id'>item</span><span class='dot token'>.</span><span class='value identifier id'>value</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span>
1842
+ <span class='end end kw'>end</span>
1843
+ <span class='@auto_fit_data ivar id'>@auto_fit_data</span><span class='lbrack token'>[</span><span class='index identifier id'>index</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='col identifier id'>col</span>
1844
+ <span class='end end kw'>end</span>
1845
+ <span class='cells identifier id'>cells</span>
1846
+ <span class='end end kw'>end</span>
1847
+ </pre>
1848
+ </td>
1849
+ </tr>
1850
+ </table>
1851
+ </div>
1852
+
1853
+ </div>
1854
+
1855
+ </div>
1856
+
1857
+ <div id="footer">
1858
+ Generated on Tue Nov 22 00:27:50 2011 by
1859
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1860
+ 0.7.3 (ruby-1.8.7).
1861
+ </div>
1862
+
1863
+ </body>
1864
+ </html>