writeexcel 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -19,3 +19,6 @@ rdoc
19
19
  pkg
20
20
 
21
21
  ## PROJECT::SPECIFIC
22
+
23
+ ## NETBEANS
24
+ nbproject
@@ -4,6 +4,10 @@ Write to a cross-platform Excel binary file.
4
4
 
5
5
  == Recent Changes
6
6
 
7
+ v0.4.1
8
+ * Bug fix. Workbook#add_format() doesn't work when received two or more parameters.
9
+ * Bug fix. Worksheet#write_formula() doesn't work when formula contains utf8 string.
10
+
7
11
  v0.4.0
8
12
  * works also on Ruby 1.9.1.
9
13
  * modify README.rdoc below.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/ruby -w
2
+ # -*- coding: utf-8 -*-
3
+
4
+ $debug = true
5
+
6
+ require 'writeexcel'
7
+
8
+ workbook = WriteExcel.new('utf8.xls')
9
+ worksheet = workbook.add_worksheet('シート1')
10
+ format = workbook.add_format(:font => 'MS 明朝')
11
+ worksheet.set_footer('フッター')
12
+ worksheet.set_header('ヘッダー')
13
+ worksheet.write('A1', 'UTF8文字列', format)
14
+ worksheet.write('A2', '=CONCATENATE(A1,"の連結")', format)
15
+ workbook.close
@@ -10,7 +10,24 @@
10
10
  # original written in Perl by John McNamara
11
11
  # converted to Ruby by Hideo Nakamura, cxn03651@msj.biglobe.ne.jp
12
12
  #
13
+ require 'writeexcel/biffwriter'
14
+ require 'writeexcel/olewriter'
15
+ require 'writeexcel/formula'
16
+ require 'writeexcel/format'
17
+ require 'writeexcel/worksheet'
13
18
  require "writeexcel/workbook"
19
+ require 'writeexcel/chart'
20
+ require 'writeexcel/charts/area'
21
+ require 'writeexcel/charts/bar'
22
+ require 'writeexcel/charts/column'
23
+ require 'writeexcel/charts/external'
24
+ require 'writeexcel/charts/line'
25
+ require 'writeexcel/charts/pie'
26
+ require 'writeexcel/charts/scatter'
27
+ require 'writeexcel/charts/stock'
28
+ require 'writeexcel/storage_lite'
29
+ require 'writeexcel/compatibility'
30
+ require 'writeexcel/debug_info'
14
31
  #
15
32
  # = WriteExcel - Write to a cross-platform Excel binary file.
16
33
  #
@@ -58,6 +75,9 @@
58
75
  # worksheet.write('A3', 1.2345)
59
76
  # worksheet.write('A4', '=SIN(PI()/4)')
60
77
  #
78
+ # # Save to ruby.xls
79
+ # workbook.close
80
+ #
61
81
  # == Description
62
82
  #
63
83
  # WriteExcel can be used to create a cross-platform Excel binary file.
@@ -83,7 +103,7 @@
83
103
  # possible. As a result there is a lot of documentation to accompany the
84
104
  # interface and it can be difficult at first glance to see what it important
85
105
  # and what is not. So for those of you who prefer to assemble Ikea furniture
86
- # first and then read the instructions, here are three easy steps:
106
+ # first and then read the instructions, here are four easy steps:
87
107
  #
88
108
  # 1. Create a new Excel workbook (i.e. file) using new().
89
109
  #
@@ -91,6 +111,8 @@
91
111
  #
92
112
  # 3. Write to the worksheet using write().
93
113
  #
114
+ # 4. Save to file.
115
+ #
94
116
  # Like this:
95
117
  #
96
118
  # require 'WriteExcel' # Step 0
@@ -98,6 +120,7 @@
98
120
  # workbook = WriteExcel.new('ruby.xls') # Step 1
99
121
  # worksheet = workbook.add_worksheet # Step 2
100
122
  # worksheet.write('A1', 'Hi Excel!') # Step 3
123
+ # workbook.close # Step 4
101
124
  #
102
125
  # This will create an Excel file called ruby.xls with a single worksheet and the
103
126
  # text 'Hi Excel!' in the relevant cell. And that's it. Okay, so there is
@@ -13,8 +13,9 @@
13
13
 
14
14
 
15
15
  require 'tempfile'
16
+ require 'writeexcel/write_file'
16
17
 
17
- class BIFFWriter #:nodoc:
18
+ class BIFFWriter < WriteFile #:nodoc:
18
19
 
19
20
  BIFF_Version = 0x0600
20
21
  BigEndian = [1].pack("I") == [1].pack("N")
@@ -70,47 +71,6 @@ def set_byte_order
70
71
  end
71
72
  end
72
73
 
73
- ###############################################################################
74
- #
75
- # _prepend($data)
76
- #
77
- # General storage function
78
- #
79
- def prepend(*args)
80
- d = args.join
81
- d = add_continue(d) if d.bytesize > @limit
82
-
83
- @datasize += d.bytesize
84
- @data = d + @data
85
-
86
- print "prepend\n" if defined?($debug)
87
- print d.unpack('C*').map! {|c| sprintf("%02X", c) }.join(' ') + "\n\n" if defined?($debug)
88
- d
89
- end
90
-
91
- ###############################################################################
92
- #
93
- # _append($data)
94
- #
95
- # General storage function
96
- #
97
- def append(*args)
98
- d = args.collect{ |a| a.dup.force_encoding('ASCII-8BIT') }.join
99
- # Add CONTINUE records if necessary
100
- d = add_continue(d) if d.bytesize > @limit
101
- if @using_tmpfile
102
- @filehandle.write d
103
- @datasize += d.bytesize
104
- else
105
- @datasize += d.bytesize
106
- @data = @data + d
107
- end
108
-
109
- print "append\n" if defined?($debug)
110
- print d.unpack('C*').map! {|c| sprintf("%02X", c) }.join(' ') + "\n\n" if defined?($debug)
111
- d
112
- end
113
-
114
74
  ###############################################################################
115
75
  #
116
76
  # get_data().
@@ -168,7 +128,6 @@ def store_bof(type = 0x0005)
168
128
  header = [record,length].pack("vv")
169
129
  data = [BIFF_Version,type,build,year,bfh,sfo].pack("vvvvVV")
170
130
 
171
- print "store_bof in #{__FILE__}\n" if defined?($debug)
172
131
  prepend(header, data)
173
132
  end
174
133
 
@@ -183,7 +142,6 @@ def store_eof
183
142
  length = 0x0000
184
143
  header = [record,length].pack("vv")
185
144
 
186
- print "store_eof in #{__FILE__}\n" if defined?($debug)
187
145
  append(header)
188
146
  end
189
147
 
@@ -0,0 +1,12 @@
1
+ # -*- coding: utf-8 -*-
2
+ module CallerInfo
3
+ #
4
+ # return stack trace info if defined?($debug).
5
+ #
6
+ def caller_info
7
+ caller(3).collect { |info|
8
+ file = File.expand_path(info.sub(/:(\d+)[^\d`]*(`([^']+)')?/, ''))
9
+ { :file => file, :line => $1, :method => $3 }
10
+ }.select { |info| info[:method] } # delete if info[:method] == nil
11
+ end
12
+ end
@@ -13,6 +13,7 @@
13
13
  #
14
14
 
15
15
  require 'writeexcel/worksheet'
16
+ require 'writeexcel/colors'
16
17
 
17
18
  ###############################################################################
18
19
  #
@@ -481,7 +482,6 @@ def embedded=(val) # :nodoc:
481
482
  #
482
483
  def prepend(*args) # :nodoc:
483
484
  @using_tmpfile = false
484
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
485
485
  append(*args)
486
486
  end
487
487
 
@@ -602,7 +602,6 @@ def store_window2 # :nodoc:
602
602
  header = [record, length].pack("vv")
603
603
  data = [grbit, rwTop, colLeft, rgbHdr].pack("vvvV")
604
604
 
605
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
606
605
  append(header, data)
607
606
  end
608
607
 
@@ -672,8 +671,7 @@ def encode_utf16(str, encoding = 0) # :nodoc:
672
671
 
673
672
  # Handle utf8 strings.
674
673
  if string.encoding == Encoding::UTF_8
675
- string = NKF.nkf('-w16B0 -m0 -W', string)
676
- string.force_encoding('UTF-16BE')
674
+ utf8_to_16be(string)
677
675
  encoding = 1
678
676
  end
679
677
 
@@ -696,49 +694,15 @@ def encode_utf16(str, encoding = 0) # :nodoc:
696
694
  # RGB colour number.
697
695
  #
698
696
  def get_color_indices(color) # :nodoc:
699
- return [nil, nil] if color.nil?
700
-
701
- colors = {
702
- :aqua => 0x0F,
703
- :cyan => 0x0F,
704
- :black => 0x08,
705
- :blue => 0x0C,
706
- :brown => 0x10,
707
- :magenta => 0x0E,
708
- :fuchsia => 0x0E,
709
- :gray => 0x17,
710
- :grey => 0x17,
711
- :green => 0x11,
712
- :lime => 0x0B,
713
- :navy => 0x12,
714
- :orange => 0x35,
715
- :pink => 0x21,
716
- :purple => 0x14,
717
- :red => 0x0A,
718
- :silver => 0x16,
719
- :white => 0x09,
720
- :yellow => 0x0D,
721
- }
697
+ invalid = 0x7FFF # return from Colors#get_color when color is invalid
722
698
 
723
- # Check for the various supported colour index/name possibilities.
724
- color = color.downcase.to_sym if color.kind_of?(String)
725
- if color.kind_of?(Symbol)
726
- if colors.has_key?(color)
727
- # Colour matches one of the supported colour names.
728
- index = colors[color]
729
- else
730
- return [nil, nil]
731
- end
732
- elsif color < 8 || color > 63
733
- # Return undef if index is out of range.
734
- return [nil, nil]
699
+ index = Colors.new.get_color(color)
700
+ index = invalid if color.respond_to?(:coerce) && (color < 8 || color > 63)
701
+ if index == invalid
702
+ [nil, nil]
735
703
  else
736
- # We should have a valid color index in a valid range.
737
- index = color
704
+ [index, get_color_rbg(index)]
738
705
  end
739
-
740
- rgb = get_color_rbg(index)
741
- [index, rgb]
742
706
  end
743
707
 
744
708
  ###############################################################################
@@ -763,7 +727,7 @@ def get_color_rbg(index) # :nodoc:
763
727
  # defined value.
764
728
  #
765
729
  def get_line_pattern(value) # :nodoc:
766
- value = value.downcase if value.kind_of?(String)
730
+ value = value.downcase if value.respond_to?(:to_str)
767
731
  default = 0
768
732
 
769
733
  patterns = {
@@ -802,7 +766,7 @@ def get_line_pattern(value) # :nodoc:
802
766
  # defined value.
803
767
  #
804
768
  def get_line_weight(value) # :nodoc:
805
- value = value.downcase if value.kind_of?(String)
769
+ value = value.downcase if value.respond_to?(:to_str)
806
770
  default = 0
807
771
 
808
772
  weights = {
@@ -1239,7 +1203,6 @@ def store_3dbarshape # :nodoc:
1239
1203
  data = [riser].pack('C')
1240
1204
  data += [taper].pack('C')
1241
1205
 
1242
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1243
1206
  append(header, data)
1244
1207
  end
1245
1208
 
@@ -1271,13 +1234,12 @@ def store_ai(id, type, formula, format_index = 0) # :nodoc:
1271
1234
  data += [grbit].pack('v')
1272
1235
  data += [format_index].pack('v')
1273
1236
  data += [formula_length].pack('v')
1274
- if formula.kind_of?(Array)
1237
+ if formula.respond_to?(:to_array)
1275
1238
  data += formula[0].encode('BINARY')
1276
1239
  else
1277
1240
  data += formula.encode('BINARY') unless formula.nil?
1278
1241
  end
1279
1242
 
1280
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1281
1243
  append(header, data)
1282
1244
  end
1283
1245
 
@@ -1306,7 +1268,6 @@ def store_areaformat(rgbFore, rgbBack, pattern, grbit, indexFore, indexBack) #
1306
1268
  data += [indexFore].pack('v')
1307
1269
  data += [indexBack].pack('v')
1308
1270
 
1309
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1310
1271
  append(header, data)
1311
1272
  end
1312
1273
 
@@ -1340,7 +1301,6 @@ def store_axcext # :nodoc:
1340
1301
  data += [catCrossDate].pack('v')
1341
1302
  data += [grbit].pack('v')
1342
1303
 
1343
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1344
1304
  append(header, data)
1345
1305
  end
1346
1306
 
@@ -1358,7 +1318,6 @@ def store_axesused(num_axes) # :nodoc:
1358
1318
  header = [record, length].pack('vv')
1359
1319
  data = [num_axes].pack('v')
1360
1320
 
1361
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1362
1321
  append(header, data)
1363
1322
  end
1364
1323
 
@@ -1384,7 +1343,6 @@ def store_axis(type) # :nodoc:
1384
1343
  data += [reserved3].pack('V')
1385
1344
  data += [reserved4].pack('V')
1386
1345
 
1387
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1388
1346
  append(header, data)
1389
1347
  end
1390
1348
 
@@ -1402,7 +1360,6 @@ def store_axislineformat # :nodoc:
1402
1360
  header = [record, length].pack('vv')
1403
1361
  data = [line_format].pack('v')
1404
1362
 
1405
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1406
1363
  append(header, data)
1407
1364
  end
1408
1365
 
@@ -1428,7 +1385,6 @@ def store_axisparent(iax, x, y, dx, dy) # :nodoc:
1428
1385
  data += [dx].pack('V')
1429
1386
  data += [dy].pack('V')
1430
1387
 
1431
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1432
1388
  append(header, data)
1433
1389
  end
1434
1390
 
@@ -1444,7 +1400,6 @@ def store_begin # :nodoc:
1444
1400
 
1445
1401
  header = [record, length].pack('vv')
1446
1402
 
1447
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1448
1403
  append(header)
1449
1404
  end
1450
1405
 
@@ -1468,7 +1423,6 @@ def store_catserrange # :nodoc:
1468
1423
  data += [catMark].pack('v')
1469
1424
  data += [grbit].pack('v')
1470
1425
 
1471
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1472
1426
  append(header, data)
1473
1427
  end
1474
1428
 
@@ -1494,7 +1448,6 @@ def store_chart(x_pos, y_pos, dx, dy) # :nodoc:
1494
1448
  data += [dx].pack('V')
1495
1449
  data += [dy].pack('V')
1496
1450
 
1497
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1498
1451
  append(header, data)
1499
1452
  end
1500
1453
 
@@ -1523,7 +1476,6 @@ def store_chartformat(grbit = 0) # :nodoc:
1523
1476
  data += [grbit].pack('v')
1524
1477
  data += [icrt].pack('v')
1525
1478
 
1526
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1527
1479
  append(header, data)
1528
1480
  end
1529
1481
 
@@ -1541,7 +1493,6 @@ def store_chartline # :nodoc:
1541
1493
  header = [record, length].pack('vv')
1542
1494
  data = [type].pack('v')
1543
1495
 
1544
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1545
1496
  append(header, data)
1546
1497
  end
1547
1498
 
@@ -1581,7 +1532,6 @@ def store_charttext # :nodoc:
1581
1532
  data += [grbit2].pack('v')
1582
1533
  data += [rotation].pack('v')
1583
1534
 
1584
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1585
1535
  append(header, data)
1586
1536
  end
1587
1537
 
@@ -1606,7 +1556,6 @@ def store_dataformat(series_index, series_number, point_number) # :nodoc:
1606
1556
  data += [series_number].pack('v')
1607
1557
  data += [grbit].pack('v')
1608
1558
 
1609
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1610
1559
  append(header, data)
1611
1560
  end
1612
1561
 
@@ -1625,7 +1574,6 @@ def store_defaulttext # :nodoc:
1625
1574
  header = [record, length].pack('vv')
1626
1575
  data = [type].pack('v')
1627
1576
 
1628
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1629
1577
  append(header, data)
1630
1578
  end
1631
1579
 
@@ -1643,7 +1591,6 @@ def store_dropbar # :nodoc:
1643
1591
  header = [record, length].pack('vv')
1644
1592
  data = [percent_gap].pack('v')
1645
1593
 
1646
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1647
1594
  append(header, data)
1648
1595
  end
1649
1596
 
@@ -1659,7 +1606,6 @@ def store_end # :nodoc:
1659
1606
 
1660
1607
  header = [record, length].pack('vv')
1661
1608
 
1662
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1663
1609
  append(header)
1664
1610
  end
1665
1611
 
@@ -1685,7 +1631,6 @@ def store_fbi(index, height, width_basis, height_basis, scale_basis) # :nodoc:
1685
1631
  data += [scale_basis].pack('v')
1686
1632
  data += [index].pack('v')
1687
1633
 
1688
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1689
1634
  append(header, data)
1690
1635
  end
1691
1636
 
@@ -1704,7 +1649,6 @@ def store_fontx(index) # :nodoc:
1704
1649
  header = [record, length].pack('vv')
1705
1650
  data = [index].pack('v')
1706
1651
 
1707
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1708
1652
  append(header, data)
1709
1653
  end
1710
1654
 
@@ -1724,7 +1668,6 @@ def store_frame(frame_type, grbit) # :nodoc:
1724
1668
  data = [frame_type].pack('v')
1725
1669
  data += [grbit].pack('v')
1726
1670
 
1727
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1728
1671
  append(header, data)
1729
1672
  end
1730
1673
 
@@ -1754,7 +1697,6 @@ def store_legend(x, y, width, height, wType, wSpacing, grbit) # :nodoc:
1754
1697
  data += [wSpacing].pack('C')
1755
1698
  data += [grbit].pack('v')
1756
1699
 
1757
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1758
1700
  append(header, data)
1759
1701
  end
1760
1702
 
@@ -1780,7 +1722,6 @@ def store_lineformat(rgb, lns, we, grbit, index) # :nodoc:
1780
1722
  data += [grbit].pack('v')
1781
1723
  data += [index].pack('v')
1782
1724
 
1783
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1784
1725
  append(header, data)
1785
1726
  end
1786
1727
 
@@ -1810,7 +1751,6 @@ def store_markerformat(rgbFore, rgbBack, marker, grbit, icvFore, icvBack, miSize
1810
1751
  data += [icvBack].pack('v')
1811
1752
  data += [miSize].pack('V')
1812
1753
 
1813
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1814
1754
  append(header, data)
1815
1755
  end
1816
1756
 
@@ -1832,7 +1772,6 @@ def store_objectlink(link_type) # :nodoc:
1832
1772
  data += [link_index1].pack('v')
1833
1773
  data += [link_index2].pack('v')
1834
1774
 
1835
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1836
1775
  append(header, data)
1837
1776
  end
1838
1777
 
@@ -1850,7 +1789,6 @@ def store_pieformat # :nodoc:
1850
1789
  header = [record, length].pack('vv')
1851
1790
  data = [percent].pack('v')
1852
1791
 
1853
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1854
1792
  append(header, data)
1855
1793
  end
1856
1794
 
@@ -1867,7 +1805,6 @@ def store_plotarea # :nodoc:
1867
1805
 
1868
1806
  header = [record, length].pack('vv')
1869
1807
 
1870
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1871
1808
  append(header)
1872
1809
  end
1873
1810
 
@@ -1887,7 +1824,6 @@ def store_plotgrowth # :nodoc:
1887
1824
  data = [dx_plot].pack('V')
1888
1825
  data += [dy_plot].pack('V')
1889
1826
 
1890
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1891
1827
  append(header, data)
1892
1828
  end
1893
1829
 
@@ -1916,7 +1852,6 @@ def store_pos(mdTopLt, mdBotRt, x1, y1, x2, y2) # :nodoc:
1916
1852
  data += [x2].pack('V')
1917
1853
  data += [y2].pack('V')
1918
1854
 
1919
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1920
1855
  append(header, data)
1921
1856
  end
1922
1857
 
@@ -1952,7 +1887,6 @@ def store_serauxtrend(reg_type, poly_order, equation, r_squared) # :nodoc:
1952
1887
  data += forecast
1953
1888
  data += backcast
1954
1889
 
1955
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1956
1890
  append(header, data)
1957
1891
  end
1958
1892
 
@@ -1980,7 +1914,6 @@ def store_series(category_count, value_count) # :nodoc:
1980
1914
  data += [bubble_type].pack('v')
1981
1915
  data += [bubble_count].pack('v')
1982
1916
 
1983
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
1984
1917
  append(header, data)
1985
1918
  end
1986
1919
 
@@ -2015,7 +1948,6 @@ def store_seriestext(str, encoding) # :nodoc:
2015
1948
  data += [cch].pack('C')
2016
1949
  data += [encoding].pack('C')
2017
1950
 
2018
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
2019
1951
  append(header, data, str)
2020
1952
  end
2021
1953
 
@@ -2033,7 +1965,6 @@ def store_serparent(series) # :nodoc:
2033
1965
  header = [record, length].pack('vv')
2034
1966
  data = [series].pack('v')
2035
1967
 
2036
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
2037
1968
  append(header, data)
2038
1969
  end
2039
1970
 
@@ -2051,7 +1982,6 @@ def store_sertocrt # :nodoc:
2051
1982
  header = [record, length].pack('vv')
2052
1983
  data = [chartgroup].pack('v')
2053
1984
 
2054
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
2055
1985
  append(header, data)
2056
1986
  end
2057
1987
 
@@ -2073,7 +2003,6 @@ def store_shtprops # :nodoc:
2073
2003
  data = [grbit].pack('v')
2074
2004
  data += [empty_cells].pack('v')
2075
2005
 
2076
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
2077
2006
  append(header, data)
2078
2007
  end
2079
2008
 
@@ -2113,7 +2042,6 @@ def store_text(x, y, dx, dy, grbit1, grbit2, rotation = 0x00)# :nodoc:
2113
2042
  data += [grbit2].pack('v')
2114
2043
  data += [rotation].pack('v')
2115
2044
 
2116
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
2117
2045
  append(header, data)
2118
2046
  end
2119
2047
 
@@ -2153,7 +2081,6 @@ def store_tick # :nodoc:
2153
2081
  data += [index].pack('v')
2154
2082
  data += [reserved5].pack('v')
2155
2083
 
2156
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
2157
2084
  append(header, data)
2158
2085
  end
2159
2086
 
@@ -2183,7 +2110,6 @@ def store_valuerange # :nodoc:
2183
2110
  data += [numCross].pack('d')
2184
2111
  data += [grbit].pack('v')
2185
2112
 
2186
- print "sheet #{@name} : #{__FILE__}(#{__LINE__}) \n" if defined?($debug)
2187
2113
  append(header, data)
2188
2114
  end
2189
2115