writeexcel 0.6.6 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +0 -0
- data/.gitattributes +0 -0
- data/README.rdoc +9 -35
- data/Rakefile +0 -0
- data/VERSION +1 -1
- data/charts/chartex.rb +0 -0
- data/charts/demo1.rb +0 -0
- data/charts/demo101.bin +0 -0
- data/charts/demo2.rb +0 -0
- data/charts/demo201.bin +0 -0
- data/charts/demo3.rb +0 -0
- data/charts/demo301.bin +0 -0
- data/charts/demo4.rb +0 -0
- data/charts/demo401.bin +0 -0
- data/charts/demo5.rb +0 -0
- data/charts/demo501.bin +0 -0
- data/examples/a_simple.rb +0 -0
- data/examples/autofilter.rb +0 -0
- data/examples/bigfile.rb +0 -0
- data/examples/chart_area.rb +0 -0
- data/examples/chart_bar.rb +0 -0
- data/examples/chart_column.rb +0 -0
- data/examples/chart_line.rb +0 -0
- data/examples/chart_pie.rb +0 -0
- data/examples/chart_scatter.rb +0 -0
- data/examples/chart_stock.rb +0 -0
- data/examples/chess.rb +0 -0
- data/examples/colors.rb +0 -0
- data/examples/comments1.rb +0 -0
- data/examples/comments2.rb +0 -0
- data/examples/copyformat.rb +0 -0
- data/examples/data_validate.rb +0 -0
- data/examples/date_time.rb +0 -0
- data/examples/defined_name.rb +0 -0
- data/examples/demo.rb +0 -0
- data/examples/diag_border.rb +0 -0
- data/examples/formats.rb +0 -0
- data/examples/formula_result.rb +0 -0
- data/examples/header.rb +0 -0
- data/examples/hide_sheet.rb +0 -0
- data/examples/hyperlink.rb +0 -0
- data/examples/images.rb +0 -0
- data/examples/indent.rb +0 -0
- data/examples/merge1.rb +0 -0
- data/examples/merge2.rb +0 -0
- data/examples/merge3.rb +0 -0
- data/examples/merge4.rb +0 -0
- data/examples/merge5.rb +0 -0
- data/examples/merge6.rb +0 -0
- data/examples/outline.rb +0 -0
- data/examples/outline_collapsed.rb +0 -0
- data/examples/panes.rb +0 -0
- data/examples/properties.rb +0 -0
- data/examples/properties_jp.rb +0 -0
- data/examples/protection.rb +0 -0
- data/examples/regions.rb +0 -0
- data/examples/repeat.rb +0 -0
- data/examples/republic.png +0 -0
- data/examples/right_to_left.rb +0 -0
- data/examples/row_wrap.rb +0 -0
- data/examples/set_first_sheet.rb +14 -0
- data/examples/stats.rb +0 -0
- data/examples/stocks.rb +0 -0
- data/examples/tab_colors.rb +0 -0
- data/examples/utf8.rb +0 -0
- data/examples/write_arrays.rb +0 -0
- data/html/en/doc_en.html +5941 -0
- data/html/images/a_simple.jpg +0 -0
- data/html/images/area1.jpg +0 -0
- data/html/images/bar1.jpg +0 -0
- data/html/images/chart_area.xls +0 -0
- data/html/images/column1.jpg +0 -0
- data/html/images/data_validation.jpg +0 -0
- data/html/images/line1.jpg +0 -0
- data/html/images/pie1.jpg +0 -0
- data/html/images/regions.jpg +0 -0
- data/html/images/scatter1.jpg +0 -0
- data/html/images/stats.jpg +0 -0
- data/html/images/stock1.jpg +0 -0
- data/html/images/stocks.jpg +0 -0
- data/html/index.html +16 -0
- data/html/style.css +433 -0
- data/lib/writeexcel/biffwriter.rb +5 -0
- data/lib/writeexcel/caller_info.rb +0 -0
- data/lib/writeexcel/chart.rb +8 -219
- data/lib/writeexcel/charts/area.rb +0 -0
- data/lib/writeexcel/charts/bar.rb +0 -0
- data/lib/writeexcel/charts/column.rb +0 -0
- data/lib/writeexcel/charts/external.rb +0 -0
- data/lib/writeexcel/charts/line.rb +0 -0
- data/lib/writeexcel/charts/pie.rb +0 -0
- data/lib/writeexcel/charts/scatter.rb +0 -0
- data/lib/writeexcel/charts/stock.rb +0 -0
- data/lib/writeexcel/colors.rb +4 -0
- data/lib/writeexcel/compatibility.rb +0 -0
- data/lib/writeexcel/debug_info.rb +0 -0
- data/lib/writeexcel/excelformula.y +0 -0
- data/lib/writeexcel/excelformulaparser.rb +0 -0
- data/lib/writeexcel/format.rb +2 -28
- data/lib/writeexcel/formula.rb +4 -70
- data/lib/writeexcel/helper.rb +0 -0
- data/lib/writeexcel/image.rb +158 -0
- data/lib/writeexcel/olewriter.rb +0 -0
- data/lib/writeexcel/properties.rb +0 -0
- data/lib/writeexcel/storage_lite.rb +0 -0
- data/lib/writeexcel/workbook.rb +434 -824
- data/lib/writeexcel/worksheet.rb +4194 -4718
- data/lib/writeexcel/write_file.rb +0 -0
- data/lib/writeexcel.rb +0 -0
- data/test/excelfile/Chart1.xls +0 -0
- data/test/excelfile/Chart2.xls +0 -0
- data/test/excelfile/Chart3.xls +0 -0
- data/test/excelfile/Chart4.xls +0 -0
- data/test/excelfile/Chart5.xls +0 -0
- data/test/helper.rb +0 -0
- data/test/perl_output/Chart1.xls.data +0 -0
- data/test/perl_output/Chart2.xls.data +0 -0
- data/test/perl_output/Chart3.xls.data +0 -0
- data/test/perl_output/Chart4.xls.data +0 -0
- data/test/perl_output/Chart5.xls.data +0 -0
- data/test/perl_output/README +0 -0
- data/test/perl_output/a_simple.xls +0 -0
- data/test/perl_output/autofilter.xls +0 -0
- data/test/perl_output/biff_add_continue_testdata +0 -0
- data/test/perl_output/chart_area.xls +0 -0
- data/test/perl_output/chart_bar.xls +0 -0
- data/test/perl_output/chart_column.xls +0 -0
- data/test/perl_output/chart_line.xls +0 -0
- data/test/perl_output/chess.xls +0 -0
- data/test/perl_output/colors.xls +0 -0
- data/test/perl_output/comments1.xls +0 -0
- data/test/perl_output/comments2.xls +0 -0
- data/test/perl_output/data_validate.xls +0 -0
- data/test/perl_output/date_time.xls +0 -0
- data/test/perl_output/defined_name.xls +0 -0
- data/test/perl_output/demo.xls +0 -0
- data/test/perl_output/demo101.bin +0 -0
- data/test/perl_output/demo201.bin +0 -0
- data/test/perl_output/demo301.bin +0 -0
- data/test/perl_output/demo401.bin +0 -0
- data/test/perl_output/demo501.bin +0 -0
- data/test/perl_output/diag_border.xls +0 -0
- data/test/perl_output/f_font_biff +0 -0
- data/test/perl_output/f_font_key +0 -0
- data/test/perl_output/f_xf_biff +0 -0
- data/test/perl_output/file_font_biff +0 -0
- data/test/perl_output/file_font_key +0 -0
- data/test/perl_output/file_xf_biff +0 -0
- data/test/perl_output/formula_result.xls +0 -0
- data/test/perl_output/headers.xls +0 -0
- data/test/perl_output/hidden.xls +0 -0
- data/test/perl_output/hide_zero.xls +0 -0
- data/test/perl_output/hyperlink.xls +0 -0
- data/test/perl_output/images.xls +0 -0
- data/test/perl_output/indent.xls +0 -0
- data/test/perl_output/merge1.xls +0 -0
- data/test/perl_output/merge2.xls +0 -0
- data/test/perl_output/merge3.xls +0 -0
- data/test/perl_output/merge4.xls +0 -0
- data/test/perl_output/merge5.xls +0 -0
- data/test/perl_output/merge6.xls +0 -0
- data/test/perl_output/ole_write_header +0 -0
- data/test/perl_output/outline.xls +0 -0
- data/test/perl_output/outline_collapsed.xls +0 -0
- data/test/perl_output/panes.xls +0 -0
- data/test/perl_output/protection.xls +0 -0
- data/test/perl_output/regions.xls +0 -0
- data/test/perl_output/right_to_left.xls +0 -0
- data/test/perl_output/set_first_sheet.xls +0 -0
- data/test/perl_output/stats.xls +0 -0
- data/test/perl_output/stocks.xls +0 -0
- data/test/perl_output/tab_colors.xls +0 -0
- data/test/perl_output/unicode_cyrillic.xls +0 -0
- data/test/perl_output/utf8.xls +0 -0
- data/test/perl_output/workbook1.xls +0 -0
- data/test/perl_output/workbook2.xls +0 -0
- data/test/perl_output/ws_colinfo +0 -0
- data/test/perl_output/ws_store_colinfo +0 -0
- data/test/perl_output/ws_store_dimensions +0 -0
- data/test/perl_output/ws_store_filtermode +0 -0
- data/test/perl_output/ws_store_filtermode_off +0 -0
- data/test/perl_output/ws_store_filtermode_on +0 -0
- data/test/perl_output/ws_store_selection +0 -0
- data/test/perl_output/ws_store_window2 +0 -0
- data/test/republic.png +0 -0
- data/test/test_00_IEEE_double.rb +0 -0
- data/test/test_01_add_worksheet.rb +0 -0
- data/test/test_02_merge_formats.rb +0 -0
- data/test/test_04_dimensions.rb +27 -27
- data/test/test_05_rows.rb +0 -0
- data/test/test_06_extsst.rb +1 -1
- data/test/test_11_date_time.rb +3 -3
- data/test/test_12_date_only.rb +7 -14
- data/test/test_13_date_seconds.rb +5 -5
- data/test/test_21_escher.rb +138 -138
- data/test/test_22_mso_drawing_group.rb +0 -0
- data/test/test_23_note.rb +4 -4
- data/test/test_24_txo.rb +3 -3
- data/test/test_25_position_object.rb +1 -1
- data/test/test_26_autofilter.rb +3 -3
- data/test/test_27_autofilter.rb +1 -1
- data/test/test_28_autofilter.rb +2 -2
- data/test/test_29_process_jpg.rb +16 -29
- data/test/test_30_validation_dval.rb +3 -3
- data/test/test_31_validation_dv_strings.rb +6 -6
- data/test/test_32_validation_dv_formula.rb +12 -12
- data/test/test_40_property_types.rb +0 -0
- data/test/test_41_properties.rb +0 -0
- data/test/test_42_set_properties.rb +0 -0
- data/test/test_50_name_stored.rb +8 -8
- data/test/test_51_name_print_area.rb +18 -18
- data/test/test_52_name_print_titles.rb +27 -27
- data/test/test_53_autofilter.rb +6 -6
- data/test/test_60_chart_generic.rb +1 -1
- data/test/test_61_chart_subclasses.rb +7 -14
- data/test/test_62_chart_formats.rb +0 -0
- data/test/test_63_chart_area_formats.rb +0 -0
- data/test/test_biff.rb +0 -0
- data/test/test_compatibility.rb +0 -0
- data/test/test_example_match.rb +31 -0
- data/test/test_format.rb +0 -0
- data/test/test_formula.rb +0 -0
- data/test/test_ole.rb +0 -0
- data/test/test_storage_lite.rb +0 -0
- data/test/test_workbook.rb +6 -0
- data/test/test_worksheet.rb +5 -5
- data/utils/add_magic_comment.rb +0 -0
- data/writeexcel.gemspec +263 -243
- data/writeexcel.rdoc +3 -3
- metadata +42 -39
|
File without changes
|
data/lib/writeexcel.rb
CHANGED
|
File without changes
|
data/test/excelfile/Chart1.xls
CHANGED
|
File without changes
|
data/test/excelfile/Chart2.xls
CHANGED
|
File without changes
|
data/test/excelfile/Chart3.xls
CHANGED
|
File without changes
|
data/test/excelfile/Chart4.xls
CHANGED
|
File without changes
|
data/test/excelfile/Chart5.xls
CHANGED
|
File without changes
|
data/test/helper.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/perl_output/README
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/perl_output/chess.xls
CHANGED
|
File without changes
|
data/test/perl_output/colors.xls
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/perl_output/demo.xls
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/perl_output/f_font_key
CHANGED
|
File without changes
|
data/test/perl_output/f_xf_biff
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/perl_output/hidden.xls
CHANGED
|
File without changes
|
|
Binary file
|
|
File without changes
|
data/test/perl_output/images.xls
CHANGED
|
File without changes
|
data/test/perl_output/indent.xls
CHANGED
|
File without changes
|
data/test/perl_output/merge1.xls
CHANGED
|
File without changes
|
data/test/perl_output/merge2.xls
CHANGED
|
File without changes
|
data/test/perl_output/merge3.xls
CHANGED
|
File without changes
|
data/test/perl_output/merge4.xls
CHANGED
|
File without changes
|
data/test/perl_output/merge5.xls
CHANGED
|
File without changes
|
data/test/perl_output/merge6.xls
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/perl_output/panes.xls
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
Binary file
|
data/test/perl_output/stats.xls
CHANGED
|
File without changes
|
data/test/perl_output/stocks.xls
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/perl_output/utf8.xls
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/perl_output/ws_colinfo
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/republic.png
CHANGED
|
File without changes
|
data/test/test_00_IEEE_double.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/test_04_dimensions.rb
CHANGED
|
@@ -29,7 +29,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def test_no_worksheet_cell_data
|
|
32
|
-
data = @worksheet.store_dimensions
|
|
32
|
+
data = @worksheet.__send__("store_dimensions")
|
|
33
33
|
|
|
34
34
|
vals = data.unpack('x4 VVvv')
|
|
35
35
|
alist = @dims.zip(vals)
|
|
@@ -43,7 +43,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
43
43
|
|
|
44
44
|
def test_data_in_cell_0_0
|
|
45
45
|
@worksheet.write(0, 0, 'Test')
|
|
46
|
-
data = @worksheet.store_dimensions
|
|
46
|
+
data = @worksheet.__send__("store_dimensions")
|
|
47
47
|
|
|
48
48
|
vals = data.unpack('x4 VVvv')
|
|
49
49
|
alist = @dims.zip(vals)
|
|
@@ -57,7 +57,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
57
57
|
|
|
58
58
|
def test_data_in_cell_0_255
|
|
59
59
|
@worksheet.write(0, 255, 'Test')
|
|
60
|
-
data = @worksheet.store_dimensions
|
|
60
|
+
data = @worksheet.__send__("store_dimensions")
|
|
61
61
|
|
|
62
62
|
vals = data.unpack('x4 VVvv')
|
|
63
63
|
alist = @dims.zip(vals)
|
|
@@ -71,7 +71,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
71
71
|
|
|
72
72
|
def test_data_in_cell_65535_0
|
|
73
73
|
@worksheet.write(65535, 0, 'Test')
|
|
74
|
-
data = @worksheet.store_dimensions
|
|
74
|
+
data = @worksheet.__send__("store_dimensions")
|
|
75
75
|
|
|
76
76
|
vals = data.unpack('x4 VVvv')
|
|
77
77
|
alist = @dims.zip(vals)
|
|
@@ -85,7 +85,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
85
85
|
|
|
86
86
|
def test_data_in_cell_65535_255
|
|
87
87
|
@worksheet.write(65535, 255, 'Test')
|
|
88
|
-
data = @worksheet.store_dimensions
|
|
88
|
+
data = @worksheet.__send__("store_dimensions")
|
|
89
89
|
|
|
90
90
|
vals = data.unpack('x4 VVvv')
|
|
91
91
|
alist = @dims.zip(vals)
|
|
@@ -99,7 +99,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
99
99
|
|
|
100
100
|
def test_set_row_for_row_4
|
|
101
101
|
@worksheet.set_row(4, 20)
|
|
102
|
-
data = @worksheet.store_dimensions
|
|
102
|
+
data = @worksheet.__send__("store_dimensions")
|
|
103
103
|
|
|
104
104
|
vals = data.unpack('x4 VVvv')
|
|
105
105
|
alist = @dims.zip(vals)
|
|
@@ -115,7 +115,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
115
115
|
@worksheet.set_row(4, 20)
|
|
116
116
|
@worksheet.set_row(5, 20)
|
|
117
117
|
@worksheet.set_row(6, 20)
|
|
118
|
-
data = @worksheet.store_dimensions
|
|
118
|
+
data = @worksheet.__send__("store_dimensions")
|
|
119
119
|
|
|
120
120
|
vals = data.unpack('x4 VVvv')
|
|
121
121
|
alist = @dims.zip(vals)
|
|
@@ -129,7 +129,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
129
129
|
|
|
130
130
|
def test_set_column_for_row_4
|
|
131
131
|
@worksheet.set_column(4, 4, 20)
|
|
132
|
-
data = @worksheet.store_dimensions
|
|
132
|
+
data = @worksheet.__send__("store_dimensions")
|
|
133
133
|
|
|
134
134
|
vals = data.unpack('x4 VVvv')
|
|
135
135
|
alist = @dims.zip(vals)
|
|
@@ -144,7 +144,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
144
144
|
def test_data_in_cell_0_0_and_set_row_for_row_4
|
|
145
145
|
@worksheet.write(0, 0, 'Test')
|
|
146
146
|
@worksheet.set_row(4, 20)
|
|
147
|
-
data = @worksheet.store_dimensions
|
|
147
|
+
data = @worksheet.__send__("store_dimensions")
|
|
148
148
|
|
|
149
149
|
vals = data.unpack('x4 VVvv')
|
|
150
150
|
alist = @dims.zip(vals)
|
|
@@ -159,7 +159,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
159
159
|
def test_data_in_cell_0_0_and_set_row_for_row_4_reverse_order
|
|
160
160
|
@worksheet.set_row(4, 20)
|
|
161
161
|
@worksheet.write(0, 0, 'Test')
|
|
162
|
-
data = @worksheet.store_dimensions
|
|
162
|
+
data = @worksheet.__send__("store_dimensions")
|
|
163
163
|
|
|
164
164
|
vals = data.unpack('x4 VVvv')
|
|
165
165
|
alist = @dims.zip(vals)
|
|
@@ -174,7 +174,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
174
174
|
def test_data_in_cell_5_3_and_set_row_for_row_4
|
|
175
175
|
@worksheet.write(5, 3, 'Test')
|
|
176
176
|
@worksheet.set_row(4, 20)
|
|
177
|
-
data = @worksheet.store_dimensions
|
|
177
|
+
data = @worksheet.__send__("store_dimensions")
|
|
178
178
|
|
|
179
179
|
vals = data.unpack('x4 VVvv')
|
|
180
180
|
alist = @dims.zip(vals)
|
|
@@ -188,7 +188,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
188
188
|
|
|
189
189
|
def test_comment_in_cell_5_3
|
|
190
190
|
@worksheet.write_comment(5, 3, 'Test')
|
|
191
|
-
data = @worksheet.store_dimensions
|
|
191
|
+
data = @worksheet.__send__("store_dimensions")
|
|
192
192
|
|
|
193
193
|
vals = data.unpack('x4 VVvv')
|
|
194
194
|
alist = @dims.zip(vals)
|
|
@@ -202,7 +202,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
202
202
|
|
|
203
203
|
def test_nil_value_for_row
|
|
204
204
|
error = @worksheet.write_string(nil, 1, 'Test')
|
|
205
|
-
data = @worksheet.store_dimensions
|
|
205
|
+
data = @worksheet.__send__("store_dimensions")
|
|
206
206
|
|
|
207
207
|
vals = data.unpack('x4 VVvv')
|
|
208
208
|
alist = @dims.zip(vals)
|
|
@@ -218,7 +218,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
218
218
|
def test_data_in_cell_5_3_and_10_1
|
|
219
219
|
@worksheet.write( 5, 3, 'Test')
|
|
220
220
|
@worksheet.write(10, 1, 'Test')
|
|
221
|
-
data = @worksheet.store_dimensions
|
|
221
|
+
data = @worksheet.__send__("store_dimensions")
|
|
222
222
|
|
|
223
223
|
vals = data.unpack('x4 VVvv')
|
|
224
224
|
alist = @dims.zip(vals)
|
|
@@ -233,7 +233,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
233
233
|
def test_data_in_cell_5_3_and_10_5
|
|
234
234
|
@worksheet.write( 5, 3, 'Test')
|
|
235
235
|
@worksheet.write(10, 5, 'Test')
|
|
236
|
-
data = @worksheet.store_dimensions
|
|
236
|
+
data = @worksheet.__send__("store_dimensions")
|
|
237
237
|
|
|
238
238
|
vals = data.unpack('x4 VVvv')
|
|
239
239
|
alist = @dims.zip(vals)
|
|
@@ -247,7 +247,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
247
247
|
|
|
248
248
|
def test_write_string
|
|
249
249
|
@worksheet.write_string(5, 3, 'Test')
|
|
250
|
-
data = @worksheet.store_dimensions
|
|
250
|
+
data = @worksheet.__send__("store_dimensions")
|
|
251
251
|
|
|
252
252
|
vals = data.unpack('x4 VVvv')
|
|
253
253
|
alist = @dims.zip(vals)
|
|
@@ -261,7 +261,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
261
261
|
|
|
262
262
|
def test_write_number
|
|
263
263
|
@worksheet.write_number(5, 3, 5)
|
|
264
|
-
data = @worksheet.store_dimensions
|
|
264
|
+
data = @worksheet.__send__("store_dimensions")
|
|
265
265
|
|
|
266
266
|
vals = data.unpack('x4 VVvv')
|
|
267
267
|
alist = @dims.zip(vals)
|
|
@@ -275,7 +275,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
275
275
|
|
|
276
276
|
def test_write_url
|
|
277
277
|
@worksheet.write_url(5, 3, 'http://www.ruby.com')
|
|
278
|
-
data = @worksheet.store_dimensions
|
|
278
|
+
data = @worksheet.__send__("store_dimensions")
|
|
279
279
|
|
|
280
280
|
vals = data.unpack('x4 VVvv')
|
|
281
281
|
alist = @dims.zip(vals)
|
|
@@ -289,7 +289,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
289
289
|
|
|
290
290
|
def test_write_formula
|
|
291
291
|
@worksheet.write_formula(5, 3, ' 1 + 2')
|
|
292
|
-
data = @worksheet.store_dimensions
|
|
292
|
+
data = @worksheet.__send__("store_dimensions")
|
|
293
293
|
|
|
294
294
|
vals = data.unpack('x4 VVvv')
|
|
295
295
|
alist = @dims.zip(vals)
|
|
@@ -303,7 +303,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
303
303
|
|
|
304
304
|
def test_write_blank
|
|
305
305
|
@worksheet.write_string(5, 3, @format)
|
|
306
|
-
data = @worksheet.store_dimensions
|
|
306
|
+
data = @worksheet.__send__("store_dimensions")
|
|
307
307
|
|
|
308
308
|
vals = data.unpack('x4 VVvv')
|
|
309
309
|
alist = @dims.zip(vals)
|
|
@@ -317,7 +317,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
317
317
|
|
|
318
318
|
def test_write_blank_no_format
|
|
319
319
|
@worksheet.write_string(5, 3)
|
|
320
|
-
data = @worksheet.store_dimensions
|
|
320
|
+
data = @worksheet.__send__("store_dimensions")
|
|
321
321
|
|
|
322
322
|
vals = data.unpack('x4 VVvv')
|
|
323
323
|
alist = @dims.zip(vals)
|
|
@@ -331,7 +331,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
331
331
|
|
|
332
332
|
def test_write_utf16be_string
|
|
333
333
|
@worksheet.write_utf16be_string(5, 3, @smiley)
|
|
334
|
-
data = @worksheet.store_dimensions
|
|
334
|
+
data = @worksheet.__send__("store_dimensions")
|
|
335
335
|
|
|
336
336
|
vals = data.unpack('x4 VVvv')
|
|
337
337
|
alist = @dims.zip(vals)
|
|
@@ -345,7 +345,7 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
345
345
|
|
|
346
346
|
def test_write_utf16le_string
|
|
347
347
|
@worksheet.write_utf16le_string(5, 3, @smiley)
|
|
348
|
-
data = @worksheet.store_dimensions
|
|
348
|
+
data = @worksheet.__send__("store_dimensions")
|
|
349
349
|
|
|
350
350
|
vals = data.unpack('x4 VVvv')
|
|
351
351
|
alist = @dims.zip(vals)
|
|
@@ -358,10 +358,10 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
358
358
|
end
|
|
359
359
|
|
|
360
360
|
def test_repeat_formula
|
|
361
|
-
formula = @worksheet.store_formula
|
|
361
|
+
formula = @worksheet.__send__("store_formula", '=A1 * 3 + 50')
|
|
362
362
|
@worksheet.repeat_formula(5, 3, formula, @format, 'A1', 'A2')
|
|
363
363
|
|
|
364
|
-
data = @worksheet.store_dimensions
|
|
364
|
+
data = @worksheet.__send__("store_dimensions")
|
|
365
365
|
|
|
366
366
|
vals = data.unpack('x4 VVvv')
|
|
367
367
|
alist = @dims.zip(vals)
|
|
@@ -374,10 +374,10 @@ class TC_dimensions < Test::Unit::TestCase
|
|
|
374
374
|
end
|
|
375
375
|
|
|
376
376
|
def test_merge_range
|
|
377
|
-
formula = @worksheet.store_formula
|
|
377
|
+
formula = @worksheet.__send__("store_formula", '=A1 * 3 + 50')
|
|
378
378
|
@worksheet.merge_range('C6:E8', 'Test', @format)
|
|
379
379
|
|
|
380
|
-
data = @worksheet.store_dimensions
|
|
380
|
+
data = @worksheet.__send__("store_dimensions")
|
|
381
381
|
|
|
382
382
|
vals = data.unpack('x4 VVvv')
|
|
383
383
|
alist = @dims.zip(vals)
|
data/test/test_05_rows.rb
CHANGED
|
File without changes
|
data/test/test_06_extsst.rb
CHANGED
|
@@ -66,7 +66,7 @@ class TC_extsst < Test::Unit::TestCase
|
|
|
66
66
|
str_unique = test[0]
|
|
67
67
|
|
|
68
68
|
workbook.str_unique = str_unique
|
|
69
|
-
workbook.calculate_extsst_size
|
|
69
|
+
workbook.__send__("calculate_extsst_size")
|
|
70
70
|
|
|
71
71
|
assert_equal(test[1], workbook.extsst_buckets,
|
|
72
72
|
" \tBucket number for #{str_unique} strings")
|
data/test/test_11_date_time.rb
CHANGED
|
@@ -34,7 +34,7 @@ class TC_data_time < Test::Unit::TestCase
|
|
|
34
34
|
# pass: diff < @fit_delta
|
|
35
35
|
date_time = '1899-12-31T00:00:00.0004'
|
|
36
36
|
number = 0
|
|
37
|
-
result = @worksheet.convert_date_time
|
|
37
|
+
result = @worksheet.__send__("convert_date_time", date_time)
|
|
38
38
|
result = -1 if result.nil?
|
|
39
39
|
assert(fit_cmp(number, result),
|
|
40
40
|
"Testing convert_date_time: #{date_time} => #{result} <> #{number}")
|
|
@@ -42,7 +42,7 @@ class TC_data_time < Test::Unit::TestCase
|
|
|
42
42
|
# fail: diff > @fit_delta
|
|
43
43
|
date_time = '1989-12-31%00:00:00.0005'
|
|
44
44
|
number = 0
|
|
45
|
-
result = @worksheet.convert_date_time
|
|
45
|
+
result = @worksheet.__send__("convert_date_time", date_time)
|
|
46
46
|
result = -1 if result.nil?
|
|
47
47
|
assert(!fit_cmp(number, result),
|
|
48
48
|
"Testing convert_date_time: #{date_time} => #{result} <> #{number}")
|
|
@@ -62,7 +62,7 @@ class TC_data_time < Test::Unit::TestCase
|
|
|
62
62
|
|
|
63
63
|
if line =~ /"Number">([^<]+)/
|
|
64
64
|
number = $1.to_f
|
|
65
|
-
result = @worksheet.convert_date_time
|
|
65
|
+
result = @worksheet.__send__("convert_date_time", date_time)
|
|
66
66
|
result = -1 if result.nil?
|
|
67
67
|
assert(fit_cmp(number, result),
|
|
68
68
|
"date_time: #{date_time}\n" +
|
data/test/test_12_date_only.rb
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
# -*- coding: utf-8 -*-
|
|
2
3
|
###############################################################################
|
|
3
4
|
#
|
|
@@ -16,32 +17,24 @@ require 'stringio'
|
|
|
16
17
|
|
|
17
18
|
class TC_data_only < Test::Unit::TestCase
|
|
18
19
|
|
|
19
|
-
def setup
|
|
20
|
-
@workbook = WriteExcel.new(StringIO.new)
|
|
21
|
-
@worksheet = @workbook.add_worksheet
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def teardown
|
|
25
|
-
@workbook.close
|
|
26
|
-
end
|
|
27
|
-
|
|
28
20
|
def test_the_dates_generated_by_excel
|
|
29
21
|
lines = data_generated_excel.split(/\n/)
|
|
30
22
|
while !lines.empty?
|
|
31
23
|
line = lines.shift.sub(/^\s*/,'')
|
|
32
24
|
braak if line =~ /^\s*# stop/ # For debugging
|
|
33
25
|
|
|
34
|
-
@worksheet.date_1904 = false if line =~ /Excel 1900/
|
|
35
|
-
@worksheet.date_1904 = true if line =~ /Excel 1904/
|
|
36
|
-
|
|
37
26
|
next unless line =~ /\S/ # Ignore blank lines
|
|
38
27
|
next if line =~ /^\s*#/ # Ignore comments
|
|
39
28
|
|
|
40
29
|
count, date, result = line.split(/\s+/)
|
|
41
|
-
|
|
30
|
+
count = count.to_i
|
|
31
|
+
workbook = WriteExcel.new(StringIO.new)
|
|
32
|
+
workbook.set_1904 if (201 <= count && count <= 400) || (411 <= count)
|
|
33
|
+
worksheet = workbook.add_worksheet
|
|
34
|
+
number = worksheet.__send__("convert_date_time", date)
|
|
42
35
|
number = -1 if number.nil?
|
|
43
36
|
assert_equal(result.to_i, number,
|
|
44
|
-
|
|
37
|
+
"Testing convert_date_time: #{date} #{result}")
|
|
45
38
|
end
|
|
46
39
|
end
|
|
47
40
|
|
|
@@ -33,19 +33,19 @@ class TC_data_seconds < Test::Unit::TestCase
|
|
|
33
33
|
def test_some_false_times
|
|
34
34
|
# These should fail.
|
|
35
35
|
date_time = '1899-12-31T24:00:00.000'
|
|
36
|
-
assert(! @worksheet.convert_date_time
|
|
36
|
+
assert(! @worksheet.__send__("convert_date_time", date_time),
|
|
37
37
|
" Testing incorrect time: #{date_time}\tincorrect hour caught.")
|
|
38
38
|
|
|
39
39
|
date_time = '1899-12-31T00:60:00.000'
|
|
40
|
-
assert(! @worksheet.convert_date_time
|
|
40
|
+
assert(! @worksheet.__send__("convert_date_time", date_time),
|
|
41
41
|
" Testing incorrect time: #{date_time}\tincorrect mins caught.")
|
|
42
42
|
|
|
43
43
|
date_time = '1899-12-31T00:00:60.000'
|
|
44
|
-
assert(! @worksheet.convert_date_time
|
|
44
|
+
assert(! @worksheet.__send__("convert_date_time", date_time),
|
|
45
45
|
" Testing incorrect time: $date_time\tincorrect secs caught.")
|
|
46
46
|
|
|
47
47
|
date_time = '1899-12-31T00:00:59.9999999999999999999'
|
|
48
|
-
assert(! @worksheet.convert_date_time
|
|
48
|
+
assert(! @worksheet.__send__("convert_date_time", date_time),
|
|
49
49
|
" Testing incorrect time: $date_time\tincorrect secs caught.")
|
|
50
50
|
end
|
|
51
51
|
|
|
@@ -63,7 +63,7 @@ class TC_data_seconds < Test::Unit::TestCase
|
|
|
63
63
|
|
|
64
64
|
if line =~ /"Number">([^<]+)/
|
|
65
65
|
number = $1.to_f
|
|
66
|
-
result = @worksheet.convert_date_time
|
|
66
|
+
result = @worksheet.__send__("convert_date_time", date_time)
|
|
67
67
|
result = -1 if result.nil?
|
|
68
68
|
assert(fit_cmp(number, result),
|
|
69
69
|
"date_time: #{date_time}\n" +
|